Categories

Dec 9, 2019 in Testing

Q: How to click on a hyperlink using linkText()?

1 Answer

Dec 9, 2019

driver.findElement(By.linkText(“Google”)).click();

This command finds the element using link text and then click on that element. Thus, the user would be re-directed to the corresponding page.

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Oct 24, 2019 in HTML
Dec 9, 2019 in Testing
Aug 22, 2019 in Selenium
...