How does you identify the list of links present on the page
Answer Posted / नितिन
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 |
Post New Answer View All Answers
What does a concentrator do in the selenium network?
How to read a javascript variable in selenium webdriver?
What is selenium-rc (remote control) ?
What are the annotations available in testng?
Tell us what kinds of test types are supported by selenium?
What are the steps to run automation using selenium?
Write a code to wait for a particular element to be visible on a page. Write a code to wait for an alert to appear.
Explain how you can handle colors in web driver?
what is mutation testing, Difference between system and End to End testing,Give examples of bug having high priority but low severity except spelling mistakes and logo symbol.
Explain what are the junits annotation linked with selenium?
What are the important selenium ide commands or selenese commands?
What do we mean by selenium 1 and selenium 2?
What’s new in selenium 3.0?
What are the different ways in which selenium ide can be opened?
What are the prerequisites to run selenium webdriver?