Reputation: 139
I'm trying to do an or between = and contains. I know how to do or between multiple contains but not multiple equals. I want to do something like this but it's not working:
xpath=//*[text()[="HOA fees" or [contains(.,"HOA fee:")]]]/following-sibling::*
Upvotes: 1
Views: 3761
Reputation: 111726
To fix your syntax problem, change
//*[text()[="HOA fees" or [contains(.,"HOA fee:")]]]/following-sibling::*
to
//*[text()[.="HOA fees" or contains(.,"HOA fee:")]]/following-sibling::*
This will select all sibling elements following all elements with a text node child that equals HOA fees
or has a HOA fee:
substring. If that's not exactly what you had in mind, follow-up in comments to clarify your actual goal.
See also:
Upvotes: 1