X-path, CSS selector -Locators in Selenium Webdriver | Selenium Automation Testing

Опубликовано: 04 Апрель 2026
на канале: Sajeer QA Talks
3,314
61

Locating elements in Selenium WebDriver is performed with the help of findElement() and findElements() methods provided by WebDriver and WebElement class.

By CSS ID: find_element_by_id
By CSS class name: find_element_by_class_name
By name attribute: find_element_by_name
By DOM structure or xpath: find_element_by_xpath
By link text: find_element_by_link_text
By partial link text: find_element_by_partial_link_text
By HTML tag name: find_element_by_tag_name

ID locator in Selenium is the most preferred and fastest way to locate desired WebElements on the page. ID Selenium locators are unique for each element in the DOM. Since IDs are unique for each element on the page, it is considered the fastest and safest method to locate elements

More Videos
Manual Testing :    • Manual Testing Malayalam-Tutorials  
Java Tutorials:    • Automation Testing-Java Tutorials Malayalam  
Selenium Automation testing :   • Selenium Automation Tutorials-Malayalam