Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How does you identify the list of links present on the page



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

Post New Answer

More Selenium Interview Questions

Why selenium rc is used?

0 Answers  


While injecting capabilities in webdriver to perform tests on a browser which is not supported by a webdriver what is the limitation that one can come across?

0 Answers  


How do perform drag and drop using selenium webdriver?

0 Answers  


What do we mean selenium selenium 1 and 2?

0 Answers  


Which web driver implementation is the fastest?

0 Answers  


Explain how selenium grid works?

0 Answers  


How to perform right click using webdriver?

0 Answers  


What are the types of listeners in testng?

0 Answers  


Explain what does @test(invocationcount=?) And @test(threadpoolsize=?) Indicate.

0 Answers  


What are testing types supported by selenium?

0 Answers  


What is testng?

0 Answers  


How to handle dropdowns in selenium?

0 Answers  


Categories