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)?
Asked
Active
Viewed 50 times
-1
-
1What have you tried so far? What did you started to automating? – Batajus Mar 04 '19 at 10:11
-
Are you using protractor? – skolldev Mar 04 '19 at 10:14
-
I am using only Selenium WebDriver – Balakrishna Mar 04 '19 at 10:15
1 Answers
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