Locating Strategies- (By CSS)17 Mar 2025 | 1 min read
You can also refer to our CSS tutorial: css-selector In WebDriver, CSS Selector works in six modes to identify and locate web elements. ![]() Next TopicWebDriver Locating Strategies |
Locating Strategies- (By XPath) XPath is a language used for locating nodes in XML documents. XPath can be used as a substitute when you don't have a suitable id or name attribute for the element you want to locate. XPath allows you to select individual elements, attributes, and some...
1 min read
Locating Strategies- (By CSS- Sub-String Matches) In this section, you will learn how to locate a particular web element using CSS - Sub-String Matches Technique. WebDriver provides an interesting feature of allowing partial string matches using ^, $ and*. 1. Starts with (^): To select and locate a web...
3 min read
Locating Strategies- (By CSS-Tag, Class and Attribute) In this section, you will learn how to locate a particular web element using CSS - Tag, Class and Attribute Selector. Under this scenario, we will inspect the search text box of one of the most popular search engine i.e....
2 min read
Locating Strategies- (By ID) In this section, you will learn how to locate a particular web element using the value of its id attribute. Let us consider a test case in which we will automate the following scenarios: Invoke Firefox browser Open URL: https://www.testandquiz.com/selenium/testing.html Click on the Text Box Type the value...
3 min read
Locating Strategies- (By Name) In this section, you will learn how to locate a particular web element using the value of its "name" attribute. Let us consider a test case in which we will automate the following scenarios: Invoke Firefox browser Open URL: https://www.testandquiz.com/selenium/testing.html Click on the Text Box Type...
3 min read
Locating Strategies- (By XPath- Using contains()) In this section, you will learn how to locate a particular web element by XPath- Using contains() method. "contains()" is used to identify an element, when we are familiar with some part of the attributes value of an element. Let us consider an...
1 min read
Locating Strategies- (By Link Text) In this section, you will learn how to locate a particular web element through its Link Text. Let us consider a test case in which we will automate the following scenarios: Invoke Firefox browser Open URL: https://www.testandquiz.com/selenium/testing.html Click on the link text "This is a...
3 min read
Locating Strategies- (By XPath- starts-with()) In this section, you will learn how to locate a particular web element by XPath- starts-with() method. "starts-with()" is used to identify an element, when we are familiar with the attributes value (starting with the specified text) of an element. Let us consider an...
1 min read
Locating Strategies- (By Tag Name) In this section, you will learn how to locate a particular web element using its Tag Name. Let us consider a test case in which we will automate the following scenarios: Invoke Firefox browser Open URL: https://www.testandquiz.com/selenium/testing.html Click on the Text Box Type the...
3 min read
Locating Strategies- (By XPath- Using Or) In this section, you will learn how to locate a particular web element by XPath- Using Or. Let us consider an example in which we will try to locate the Google Search Engine Text box by XPath- Using Or. Follow the steps...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India