-1

Recently I started automating the angular application and observed that my scripts are failing frequently because of high application loading time. Some of the components are loading quickly but some are not loading. How to wait selenium WebDriver till all elements in the page are loaded to avoid script failures (I want to use dynamic waiting time)?

Balakrishna
  • 53
  • 1
  • 7

1 Answers1

0

According to my knowledge dynamic waiting wont work, because you do not have any reference elements which tells that all our elements have loaded, and you can run your script now.

  • Try to find the maximum time taken by the page to load all the elements
  • Add some buffer time to it say 3-5 seconds
  • use the sum (Max time to load) + (Buffer time) use this as explicit wait
Adarsh J
  • 61
  • 6