문제

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