I am writing a python script to logon to instagram using selenium. I have written the following script to logon
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from time import sleep
url = 'https://www.instagram.com/accounts/login/?source=auth_switcher'
d = webdriver.Chrome(r"C:\Softwares\chromedriver_win32\chromedriver.exe")
d.get(url)
sleep(10)
username = d.find_element_by_name('username')
username.send_keys('test')
password = d.find_element_by_name('password')
password.send_keys('test')
login = d.find_element_by_xpath('/html/body/div[1]/section/main/div/div/div[1]/div/form/div/div[3]/button')
login.click()
Next, there comes a page where you need to select an option Save Now or Not Now option. However, I cannot access that page as the login page html and the current page html are different and I cannot access current page html.
Is there any method to access the updated html page using python