What are the different Locators that can be used to access Web Elements?

+2 votes
What are the different Locators that can be used to access Web Elements?
Dec 12, 2018 in Selenium by Nitesh
• 2,910 points
58 views

2 answers to this question.

+1 vote

@Nitesh, I would like to tell you that there are many ways that you can use to find elements using Locator in Selenium.

You can locate web elements by 

  1. ID
  2. Name
  3. Class Name
  4. Tag Name
  5. Link Text 
  6. Partial Link Text
  7. CSS Selector
  8. XPath

These are the Locators you can use to find a web element in Selenium. Hope this was of help to you.

answered Dec 12, 2018 by Priyaj
• 56,520 points
0 votes
ID, Name,Class Name, Tag Name,Link Text ,Partial Link Text, CSS Selector, XPath
These are the different locators used in selenium web driver
answered Feb 15 by Dev
• 360 points

Related Questions In Selenium

0 votes
1 answer

What are the different tools that can be used for Security Testing?

The different tools used for security testing ...READ MORE

answered Feb 19 in Selenium by Ria
66 views
0 votes
1 answer
0 votes
1 answer
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,070 points
441 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
789 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
432 views
+1 vote
3 answers

What is the command used to register gecko driver?

System.setProperty("webdriver.gecko.driver", "C:\\gecko ...READ MORE

answered Jan 9 in Selenium by Frankie
• 9,810 points
10,629 views
0 votes
1 answer

What are the major exceptions that occur in Selenium?

There are mostly 5 different types of ...READ MORE

answered Feb 13 in Selenium by Priyaj
• 56,520 points
26 views