I am clicking a link which takes me to new page, but I don't know how to proceed after that. When I try to find an element by id in the next page it gives me error:
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"id","selector":"myid"}
My code:
browser = webdriver.Firefox()
browser.get('myurl')
elem = browser.find_element_by_id('closeMessageButton') # Find the search box
elem.click() # this takes me to new link
# now I am searching id from new page
elem = browser.find_element_by_id('newpage_id') #
elem.click()
I have seen this http://www.obeythetestinggoat.com/how-to-get-selenium-to-wait-for-page-load-after-a-click.html but couldn't succeed in implementing for my case. I think the information in browser is not updated yet.