top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the element locators available with Selenium which could be used to locate elements on web page?

+1 vote
392 views
What are the element locators available with Selenium which could be used to locate elements on web page?
posted Sep 21, 2016 by Jdk

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
 
Best answer

Selenium webdriver uses 8 locators to find the elements on web page. The following are the list of object identifier or locators supported by selenium.

We have prioritized the list of locators to be used when scripting.

id - >

Select element with the specified @id attribute.

Name

Select first element with the specified @name attribute.

Linktext

Select link (anchor tag) element which contains text matching the specified link text

Partial Linktext

Select link (anchor tag) element which contains text matching the specified partial link text

Tag Name

Locate Element using a Tag Name .

Class name

Locate Element using a Tag Name ..

Css

Select the element using css selectors. You can check here for Css examples and You can also refer W3C CSS Locatros
source-
https://www.seleniumeasy.com/selenium-tutorials/selenium-locators

answer Oct 2, 2016 by Devendra Bohre
...