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

What are the different Selenium components?

0 Answers  


Explain how you can handle frames using selenium 2.0?

0 Answers  


How to assert the title of the web page?

0 Answers  


Explain junit. What are annotations?

0 Answers  


How to conduct database testing with selenium webdriver?

0 Answers  


How to highlight element using selenium webdriver?

0 Answers  


How you can handle colors in web driver?

0 Answers  


What are the different ways in which selenium ide can be opened?

0 Answers  


How can we get a text of a web element?

0 Answers  


What will be the limits of selenium?

0 Answers  


Explain how you can handle colors in web driver?

0 Answers  


What is the selenium ide and what is it used for?

0 Answers  


Categories