brithwulf
brithwulf

Reputation: 548

Getting elements with XPATH

I've faced a problem, I'm trying to manually get XPath of the objects, but many elements have the same classes and I can't get only with classes, also I want to make it dynamically, so I don't want to use selector using nodes.

Well, this is how I select the object that I want to get. I want to get only the first element, how can I make that? Inside of this div is just a text.

enter image description here

Upvotes: 0

Views: 44

Answers (1)

Dmitri T
Dmitri T

Reputation: 167992

These elements have xpath attributes so you should be able to get the first element as simple as:

//div[@xpath='1']

References:

Upvotes: 1

Related Questions