Is there a code in selenium python that says wait for all elements on page to load?. If so what is the code?.
CodePudding user response:
webdriver
will wait for a page to load by default.
It does not wait for loading inside frames or for ajax
requests. It means when you use .get('url')
, your browser will wait until the page is completely loaded and then go to the next command in the code. But when you are posting an ajax
request, webdriver
does not wait and it's your responsibility to wait an appropriate amount of time for the page or a part of page to load; so there is a module named expected_conditions
.