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 |
Mention what is listeners in selenium webdriver?
What are the different types of annotations which are used in selenium?
How to Handle Dynamic alert in selenium web driver ?
How to check whether a text is underlined or not?
How do you get all the values from Drop Down list?
What is the use of context menu in selenium ide?
What is an XPath?
how to upload file other than autoit
Why should selenium be selected as a test program?
What is the difference between driver.close() and driver.quit command?
How to insert a breakpoint in selenium ide?
How to handle a dropdown in selenium webdriver?