OR condition in CSS selector OR condition in CSS selector selenium selenium

OR condition in CSS selector


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.


#first-order price, #first price input[type='submit']


Do both elements have different IDs as well as classes? If they have different IDs you could just use:

document.GetElementById('resultVersionA');

Otherwise, if this element is only used once on the page with a given class, then:

var rsltVerA = document.GetElementsByTagName('div').getClass('resultVersionA');var rsltVerB = document.GetElementsByTagName('div').getClass('resultVersionB');