【发布时间】:2020-05-24 23:17:12
【问题描述】:
我希望能够在 Yandex 帐户注册页面中单击此元素。
我在 python 中使用 Selenium Chromedriver。
https://passport.yandex.com/registration/
我试过这段代码
element = self.driver.find_element_by_class_name("toggle-link.link_has-no-phone").click()
webdriver.ActionChains(self.driver).move_to_element(element).click(element).perform()
但我得到 ElementClickInterceptedException。
【问题讨论】:
-
在代码中选择它之后,你会有类似 .click() 之类的东西(我不记得确切没有使用硒一年),你也可以使用
ActionChains这是人性化的方法,用于躲避机器人检查员和这类东西 -
谢谢,我已经尝试过您建议的代码,但很遗憾没有奏效。
标签: python selenium selenium-chromedriver bots