I am currently attempting to submit a form using selenium driver through python 2.7.12 and then retrieving the loaded page. The code i currently does not seem to wait for the page load this is the code i have:
while False:
try:
driver.find_element_by_id("ctl00_lblStockName") #oldpage id
break
except StaleElementReferenceException:
continue
print ("Page is ready!")
f = driver.page_source
soup = BeautifulSoup(f,'html.parser')
print (soup)
The code above just prints the html of the page before the search. I'm unsure whether my while loop is working.
I have attempted another method using the timeout function but the error comes up as
AttributeError: 'WebDriver' object has no attribute 'manage'
Also I have read that using timeout is not especially reliable either, so I would like to avoid this method unless it's the only option.