Reputation: 64807
I have complex xpath selector. I want to make it generic, so it could point to input and textarea.
example xpath's
//someelement//input
//someelement//textarea
how to merge those two into single xpath?
Upvotes: 1
Views: 166
Reputation: 16927
You can use an union:
//someelement//input | //someelement//textarea
Or in XPath 2:
//someelement//(input, textarea)
Upvotes: 5