XPath query locators

Finally, the XPath query is the most versatile type of locator, since it is bidirectional by nature, but it is also the slowest locator type to use (CSS locators can only reference elements in one direction, but are faster). Here is the simple XPath locator for this field:

@FindBy(xpath = "//input[@id='identifierId']")
protected M email;

There are whole sets of rules and techniques for building CSS and XPath locators; some of these will be discussed in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.131.238