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 main advantages of automation testing?
How you can use “submit” a form using selenium?
What is the wait? How many types of waits in selenium?
What is framework and what are the frameworks available in rc?
What is the difference between single and double slash in xpath?
What are core extension?
What is selenium-rc (remote control) ?
What are some advantages of selenium grid?
What are the prerequisites to run selenium webdriver?
Tell me how can we launch different browsers in selenium webdriver?
what are the Dynamic elements in web Application?
What is the use of driver.get("url") and driver.navigate().to("url") command? Is there any difference between the two?