Hey there! any question in your mind? Ask It Now!.

Popular Categories

Can i click all hyper links on web page?

+1 vote
asked in Software Testing by mHelpMe (670 points)
I have a web page and want to click all of its links is it possible?

1 Answer

+1 vote
answered by smarttester (590 points)
selected by mHelpMe
Best answer

Yes its possible you can store all link in an array and then click on them like this : 

ArrayList<WebElement> input_type = (ArrayList<WebElement>) driver.findElements(By.tagName("a"));
for (WebElement type : input_type)
This will strore and all links and click them one by one.

Related Questions

Not a Member yet?

Ask to Folks Login

My Account
261 Folks are online
0 members and 261 guest online
Your feedback is highly appreciated