How does you identify the list of links present on the page
Answer / नितिन
WebDriver driver = new FirefoxDriver();
driver.get("http://toolsqa.wpengine.com/");
java.util.List<WebElement> links = driver.findElements(By.tagName("a"));
System.out.println(links.size());
for (int i = 1; i<=links.size(); i=i+1)
{
System.out.println(links.get(i).getText());
}
| Is This Answer Correct ? | 3 Yes | 0 No |
What is the use of context menu in selenium ide?
What is Selenese?
Is it possible to automate the captcha using selenium?
Explain me what could be the cause of selenium webdriver test to fail?
What is page object model or pom?
How can we handle window ui elements and window pop ups using selenium?
What is pom (page object model)? What are its advantages?
Do you know a way to refresh the browser by using selenium?
What is the automation test?
How to verify if the checkbox/radio is checked or not?
What is the difference between driver.getwindowhandle() and driver.getwindowhandles() in selenium webdriver?
How to invoke an application in webdriver?