How to Click a Link by Text in Selenium WebDriver Java

JAVA.

< 1 minute read 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”)); linkByText.click();