Reputation: 941
Selenium by default is waiting for all elements to be loaded. Is there any way for waiting for a specific element and then to proceed on? On my test, selenium is waiting with the wait() function for a page to be loaded. sometimes, some images couldn't be loaded from a remote server, while all others element on the page loaded successfully. How can I ask Selenium to ignore waiting all elements except a specific one?
Upvotes: 3
Views: 751
Reputation: 335
Selenium works on a copy of the page's source so it try to wait until the DOM represents what will be the page's full source. For this to work correctly selenium is bases on the document.readyState
:
this behavior is mandatory for work, otherwise the next scenarios might occur and break tests:
Upvotes: 1