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 the object repository?
How would one access the value of a side variable named name from within a javascript snippet used as the argument to a selenese command?
What is the difference between page object model (pom) and page factory?
What is the command line we have to write inside a .bat file to execute a selenium project when we are using testng?
How can we find all the links on a web page?
How to install use TestNG in selenium webdriver ?
Difference between get window handle & get window handles
What is the purpose of creating a reference variable- 'driver' of type webdriver instead of directly creating a firefoxdriver object or any other driver's reference in the statement webdriver driver = new firefoxdriver();?
What is desired capability? How is it useful in terms of selenium?
When to use autoit?
What are the advantages of selenium webdriver?
what are the Dynamic elements in web Application?