Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
217 views
by The go-to Tester (473 points)
Some time on webpage, due to high java script load , page loading not getting stop and due to this script getting failed. How to handle such scenario?

1 Answer

1 like 0 dislike
by The go-to Tester (181 points)

If  your page is not getting loaded, its clearly an application issue. Usually webdriver opens clear session by deleting the cache and cookies. So, if your application is not getting loaded, you should try explicit wait for an perticular element which you are expecting to perform action on.

eg.

WebDriverWait wait = new WebDriverWait(driver, waitTime);
wait.until(ExpectedConditions.presenceOfElementLocated(myElement));
 
Also, you can define maximum waitTime you want to wait till your applicaiton is loaded.
 
Apart from this, often times I see that certain domains are blocked from the network, such as facebook.com or twitter.com. If any call is made to domain which is blocked by your network admin, it will impact page load time. So, try to get that resolved as well.
 
Hope I answered it. 
 


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...