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 are the different Selenium components?
Explain how you can handle frames using selenium 2.0?
How to assert the title of the web page?
Explain junit. What are annotations?
How to conduct database testing with selenium webdriver?
How to highlight element using selenium webdriver?
How you can handle colors in web driver?
What are the different ways in which selenium ide can be opened?
How can we get a text of a web element?
What will be the limits of selenium?
Explain how you can handle colors in web driver?
What is the selenium ide and what is it used for?