How to use partial link text in selenium?

0 votes
What is the difference between Link text and Partial Link text and how to use Partial link text?
Dec 21, 2018 in Selenium by Jino
• 5,560 points
432 views

1 answer to this question.

0 votes

Okay so talking about 

LinkText: You need to mention the complete Link Text to access the element.

PartialLinkText: You just have to type the part of the text you know and the rest is taken care by Selenium.

The format for both are same 

driver.get("https://www.wikipedia.org/");

driver.findElement(By.partialLinkText("Foundation")).click();

The complete link text was Wikipedia Foundation so I just metioned Foundation and it works. This way you can use PartialLinkText in selenium.

Hey @Jino hope this helps.

answered Dec 21, 2018 by Nabarupa

Related Questions In Selenium

0 votes
1 answer

How to use link as a locator to find element in selenium?

Hello @Jino, its amazing to explore ways ...READ MORE

answered Dec 21, 2018 in Selenium by Nabarupa
110 views
0 votes
1 answer

How to use Actions class in Selenium Webdriver?

In seleniun webdriver it is not mandatory ...READ MORE

answered Apr 4, 2018 in Selenium by Damon Salvatore
• 5,510 points
2,508 views
0 votes
1 answer

How to use JavaScript in selenium to click an Element?

Executing a click via JavaScript has some ...READ MORE

answered Apr 13, 2018 in Selenium by Shubham
• 13,310 points
14,622 views
0 votes
1 answer

How to use Enter/Return Key in Selenium

You can use the below code: import org.openqa.selenium.Keys WebElem ...READ MORE

answered Apr 18, 2018 in Selenium by Meci Matt
• 9,420 points
521 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,110 points
995 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,148 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
890 views
0 votes
5 answers
0 votes
1 answer

How to use keyboard shortcuts in selenium?

Yes, you can use all the keyboard ...READ MORE

answered Dec 24, 2018 in Selenium by Shuvodip
2,810 views