Labanino
Labanino

Reputation: 3960

Selecting sibling text with XPath

enter image description here

I need to select the sibling text after the first @class. First I used:

//td[@class='schoolsContactsHeader']/following-sibling::text()[1]

but I'm getting a few white spaces. Then I tried:

normalize-space(//td[@class='schoolsContactsHeader']/following-sibling::text()[1])

and I'm getting, String: and nothing else. Any help? Thanks.

Upvotes: 1

Views: 147

Answers (1)

Labanino
Labanino

Reputation: 3960

I'm answering myself. The result was (//td[@class = 'schoolsContactsHeader'])[1] enter image description here

Upvotes: 1

Related Questions