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 are the junits annotation linked with selenium?
What are the advantages of the automation structure?
Where to obtain selenium ?
How to scroll web page down or up using selenium webdriver?
how to handle staleelementreferenceexception?
Explain what are the junits annotation linked with selenium?
Why to use testng with selenium rc?
How to check if a button is enabled on the page?
How do you identify an object using selenium?
How many types of waits in selenium?
How to insert a start point in selenium ide?
My application uses ajax heavily how do I use selenium rc to work with ajax operations?
What are the limitations of using selenium as a test tool?
Can captcha be automated?
Explain what is the difference between borland silk and selenium?