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

What is pom (page object model)? What are its advantages?

0 Answers  


What is object repository? How can we create an object repository in selenium?

0 Answers  


Mention what is listeners in selenium webdriver?

0 Answers  


Tell me do you know a way to refresh browser by using selenium?

0 Answers  


Explain what is the difference between find elements () and find element ()?

0 Answers  






Using selenium how can you handle network latency?

0 Answers  


difference between Implicit Wait and Explicit Wait with syntax.?

8 Answers   HCL,


Explain xpath absolute and xpath attributes.

0 Answers  


How do you achieve synchronization in webdriver?

0 Answers  


How a text written in a text field could be cleared?

0 Answers  


What is difference between @factory and @dataprovider annotation?

0 Answers  


Which is the command used for displaying the values of a variable into the output console or log?

0 Answers  


Categories