Home > Software design >  In Selenium webdriver, Is there a way to find out that all page elements have been loaded correctly
In Selenium webdriver, Is there a way to find out that all page elements have been loaded correctly

Time:12-22

In Selenium Webdriver using Java, Is there a way to find out that all page elements have been loaded correctly and no elements are overlapped?

CodePudding user response:

You can use the WebDriverWait class to wait for the page elements to load and then use the ExpectedConditions class to check if the elements are present and not overlapping. You can also use the Selenium Actions class to check for overlapping elements.

CodePudding user response:

No, there is no such a way.
What you can do is:

  1. To wait for the full page loaded (html content and subresources downloaded and parsed) - Selenium waits for this state by default after applying driver.get() method.
  2. You can wait for some specific element to be presented or visible. WebDriverWait ExpectedConditions can be used for that. But you can not explicitly wait for all the elements on the page to become loaded.
  3. There is no way to know if there are elements on the web page that are overloaded.
  • Related