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 pom (page object model)? What are its advantages?
What are the different Exceptions in selenium?
What is regular expressions? How you can use regular expressions in selenium?
How do you Upload or Download a File in Web Application?
What is selenium? What are different selenium components?
What is the significance of testng.xml?
Tell us how you can use recovery scenario with selenium?
What is the alternative to driver.get() method to open an url using selenium webdriver?
Tell me how colors could be handled in selenium webdriver?
what is the difference between type keys and type commands?
What are the drawbacks of selenium ide
How will u write page object models and data driven model.