Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97778

Create simple xpath expression with 'or' operator and a function

$
0
0

Can I make the following xpath expression to be simpler:

//*[translate(text(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ,'abcdefghijklmnopqrstuvwxyz')='word1' or translate(text(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ,'abcdefghijklmnopqrstuvwxyz')='word2']

The above fine work, but so long, maybe there is an excellent way.

I'm thinking whether I can put this function just once:

text() 'ABCDEFGHIJKLMNOPQRSTUVWXYZ''abcdefghijklmnopqrstuvwxyz'

It's possible? or is there other approach?


Viewing all articles
Browse latest Browse all 97778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>