質問

I'm trying to test a messaging feature. Messages can be read or unread depicted by an img (eg css=img[alt="unread"]). How can I tell Selenium IDE to look for either? I've tried |, || and OR which would seem the most likely operators, however Selenium looks for them as a whole target.

enter image description here

役に立ちましたか?

解決

I think the idea is not about how to put two separate css selectors in target field, but use one single css selector to select what you want.

Here is how you can do it:

css=img[alt="unread"], img[alt="read"]

Or even simply do a partial match (for example, match alt ends with read, which might match elements you don't want, be careful):

css=img[alt$="read"]
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top