I'm trying to find a element by a css selector. I have a script which I'm using on multiple sites, and there is the same element, but with different classes. Is there any way to find by something like that:
css=div[(id='resultVersionA']||[id='resultVersionB')]
Best regards
EDIT
Your solutions works, but not for my next elements
#first-order price, #first price input[type='submit']
To be more clear: In upon query I want to select button which is under div which is i 'first_order price' OR 'first price'.
Update
This should do it (sorry I didn't see your edit before):
#first-order price input[type='submit'], #first price input[type='submit']
Old answer, don't use
If you are searching for IDs,
div#resultVersionA, div#resultVersionB
If you are searching for classes,
div.resultVersionA, div.resultVersionB
No need for attribute selectors. If you don't care about element type you can also omit the div
parts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With