Locating Strategies- (By XPath- Using And)
In this section, you will learn how to locate a particular web element by XPath- Using And.
Let us consider an example in which we will try to locate the Google Search Engine Text box by XPath- Using And.
Follow the steps given below to locate the textbox provided on the home page of Google Search Engine.
The syntax for locating elements through XPath- Using And can be written as:
Using XPath-And, we can write the Java code along with the dynamic XPath location as: