how to test page loaded successfully?

Answers were Sorted based on User's Feedback



how to test page loaded successfully?..

Answer / surya

using WebDriverWait we can check as we can wait until completion of expected condition.

ex:
WebDriverWait wait = new WebDriverWait(driver, 10);

WebElement elem = driver.findElement(By.id("myInvisibleElement"));
elem.click();
wait.until(ExpectedConditions.visibilityOf(elem));

please correct me if i m wrong.

Is This Answer Correct ?    2 Yes 0 No

how to test page loaded successfully?..

Answer / dolly

We can ensure that the page is loaded completely by using javascriptwait method, by defining the wait time to check the condition.
(“return document.readyState”.equal(complete) ---boolean(Y/N) – true means its loaded completely.
Using TRY n Catch method (catch the exception saying page did not load in the stipulated time)

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Selenium Interview Questions

How to read a javascript variable in selenium webdriver?

0 Answers  


How selenium grid hub keeps in touch with rc slave machine?

0 Answers  


Explain me how to execute javascript in selenium?

0 Answers  


Explain the line of code webdriver driver = new firefoxdriver()?

1 Answers  


Why do you need session handling while working with selenium?

0 Answers  






What are the ways to refresh a browser using selenium webdriver?

0 Answers  


List the different selenium tools.

1 Answers  


How to create and run testng.xml?

0 Answers  


How to execute javascript in selenium?

0 Answers  


What is the testng.xml file used for?

0 Answers  


Tell us what are the two modes of views in selenium ide?

0 Answers  


What are the different exceptions you got when working with webdriver?

0 Answers  


Categories