【发布时间】:2018-12-09 07:03:11
【问题描述】:
我正在尝试使用我目前正在编码的“instagram bot”登录 Instagram。我已经通过登录屏幕,通过“获取应用程序”屏幕以及它希望如何打开通知。两个选项是“打开”和“现在不”。我正在尝试使用与以前相同的方法单击“不是现在”,但它不起作用。代码(在 Firefox 上使用检查元素)说
<button class="aOOlW HoLwm " tabindex="0">Not Now</button>
我已经尝试将类代码与
一起使用notNowButton = driver.find_element_by_xpath("//a[@class='aOOlW HoLwm']")
# or
notNowButton = driver.find_element_by_xpath("//a[@tabindex='0']")
但这也不起作用。有什么帮助吗?
通知:
【问题讨论】:
标签: python selenium xpath css-selectors instagram