I'm currently using Selenium in Python and I'm running into the issue of tracking when a page has switched to another page. So say I have the following code to open up a page and then login:
self.driver.get(targeturl)
login = self.driver.find_element_by_name("login")
login.send_keys("user1")
password = self.driver.find_element_by_name("password")
password.send_keys("password123")
login.submit()
#How do I find when the page has changed after submit()?
After the login form is submitted, the page switches to another page. How can I use Selenium to determine exactly when the first page has switched to the second page?
Aucun commentaire:
Enregistrer un commentaire