how to test page loaded successfully?
Answers were Sorted based on User's Feedback
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 |
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 |
How to get a text of a web element?
How to install use TestNG in selenium webdriver ?
What is group test in testng?
What is the firefoxdriver, class or an interface? And which interface does it implement?
What is the difference between TESTNG and JUNIT? List out Annotations?
1 Answers HCL, Quovantis Technologies,
What api is required for database testing in selenium webdriver?
How do you get the attribute of the web element?
How does click on button without using click method
Explain how you can handle colors in web driver?
What are the popular programming languages supported by selenium webdriver to write test cases?
What’s new in selenium 3.0?
What is parameterization in testng? How to pass parameters using testng.xml?