我想用 selenium 下载谷歌验证码的图片,我尝试这样做:
使用xpath:
img = driver.find_element_by_xpath('/html/body/div/div/div[2]/div[2]/div/table/ tbody/tr[1]/td[3]/div/div[1]/img')
但它没有找到图像并抛出 NoSuchElementException?
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div/div/div[2]/div[2]/div/table/tbody/tr[1]/td[2]/div/div[1]/img"} (Session info: chrome=88.0.4324.187)