java - xpath how to get quantity of links on page? -
For example, I'm searching for something in Google, instead I get search results, and I'm using xpath or any other locator Need is the essence of all the links on the results page? Any suggestions?
If I was doing this for a google search, then first let me link one. You can select a code in Chrome and inspect the I get element
, then right-click on the newly selected element, and then copy the APAP Example:
// * However, by clicking on it [@ id = "rso"] / div [1] / li [1] / div / h3 / a
it is only li [1]
and Because of the div [1]
will select a single element, which limits the query, you may have to write XPath to // * [[id = "rso"] / div / li / Div / h3 / a
, which selects all 10 search results.
Comments
Post a Comment