Issue
I am using selenium webdriver with Java. 7/10 times my script failed with error:
org.openqa.selenium.ScriptTimeoutException: script timeout
I tried so many option :
- increase wait time
- tried method jsWaitForPageToLoad and verified js.executeScript(""return document.readyState"").toString().equals("complete")
- Wait for element to visible
- wait for element to be Clickable
- Wait last element to load
but nothing worked.
Workaround : If I manually move my mouse little bit on browser then script work without issue.
As per above workaround, I tried Action class to move mouse also , but its not worked.
Env : Chrome : Version 85.0.4183.83 (Official Build) (64-bit) Selenium Webdriver : 3.141.59 Application : Developed in Angularjs
I also used ngwebdriver (1.1.5) for angularJs
Any help is highly appreciated
Solution
Issue got fixed. The issue was with waitForAngularRequestsToFinish() method of ngDriver.
Once I used as below :
ngDriver.withRootSelector(""root-app"").waitForAngularRequestsToFinish();
It worked well
Answered By - Shailendra
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.