How to Click a Link by Text in Selenium WebDriver Java

Posted by & filed under JAVA.

Here is how to click a link by text with Selenium WebDriver in Java using the built in WebDriver helper methods or by XPath: Click link by full text using Selenium WebDriver WebElement linkByText = driver.findElement(By.linkText(“My Link”));;