Analyzers may be in a circumstance to discover all the connections on a site. We can without much of a stretch do as such by discovering all components with the Tag Name "an", as we realize that for any connection reference in HTML, we have to utilize "a" (grapple) tag.
Example
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
public class getalllinks {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.navigate().to("http://www.calculator.net");
java.util.List<WebElement> links = driver.findElements(By.tagName("a"));
System.out.println("Number of Links in the Page is " + links.size());
for (int i = 1; i<=links.size(); i = i+1) {
System.out.println("Name of Link# " + i + links.get(i).getText());
}
}
}
Output
The yield of the content would be tossed to the reassure as demonstrated as follows. In spite of the fact that there are 65 connections just halfway yield is demonstrated as follows.