Automation Question:

Do you know how to locate a link using its text in Selenium?

Automation Interview Question
Automation Interview Question

Answer:

linkText() and partialLinkText() are used for link location.

The examples:

WebElement link1 = driver.findElement(By.linkText(“some_link_test”));
WebElement link2 = driver.findElement(By.partialLinkText(“some_link_part_text”));


Previous QuestionNext Question
Tell us what kind of keyboard operations can be performed in Selenium?Tell us what methods of Robot Class do you know?