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
• 3,020 points
166 views

3 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
• 57,700 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, 2019 by Dev
• 360 points
0 votes

in selenium we ahve 8 different locators .

  1. ID
  2. Name
  3. Class Name
  4. Tag Name
  5. Link Text 
  6. Partial Link Text
  7. CSS Selector
  8. XPath
answered Sep 2 by Sri
• 2,970 points

Related Questions In Selenium

0 votes
2 answers

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

Veracode is the best due to banking ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
184 views
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer
0 votes
2 answers

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,520 points
3,790 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,772 views
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,890 points
2,749 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,113 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, 2019 in Selenium by Frankie
• 9,810 points
16,570 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, 2019 in Selenium by Priyaj
• 57,700 points
85 views