Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99409

How to click on "Not Now" button within Instagram through Selenium and Python

$
0
0

I am trying to login to Instagram with an "instagram bot" that I am currently coding. I have gotten it past the login screen, past the "get the app" screen and how it want's to turn on notifications. The two option are "Turn on" and "not now". I am trying to use the same method as before to click "not now" but it wont work. The code (using inspect element on firefox) says

<button class="aOOlW   HoLwm " tabindex="0">Not Now</button>

I have tried using the class code with

notNowButton = driver.find_element_by_xpath("//a[@class='aOOlW HoLwm']")
# or
notNowButton = driver.find_element_by_xpath("//a[@tabindex='0']")

but that doesn't work either. Any help?

the notification:

enter image description here


Viewing all articles
Browse latest Browse all 99409

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>