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

1 Answer

+1 vote
by (590 points)
selected by
 
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)
{
 
 
type.click();
 
 
}
 
This will strore and all links and click them one by one.

Not a Member yet?

Ask to Folks Login

My Account

Your feedback is highly appreciated