我正在尝试使用我目前正在编写的“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']")
但这也不起作用。有什么帮助吗?
通知:
相关分类