What are the available locators in Selenium WebDriver?

What are the available locators in Selenium WebDriver?

2 Likes

You can find the locators from the list below with their respective syntax

Locator Syntax
CSS class name find_element_by_class_name
DOM structure or xpath find_element_by_xpath
name attribute find_element_by_name
CSS ID find_element_by_id
link text find_element_by_link_text
HTML tag name find_element_by_tag_name
partial link text find_element_by_partial_link_text
2 Likes