Reputation: 16445
I my tests I am using WebDriverIO. I want to get all elements with class form_error that are visible.
I try something like this:
$$('.form_error:visible')
but the :visible filter is not a valid webdriverio selector construct. How to achieve that?
Upvotes: 0
Views: 2011
Reputation: 2269
WebdriverIO uses CSS selectors to find elements, and :visible
is not a valid CSS selector.
Instead, you could go two ways:
.form_error
, then run isVisible()
on them and filter the hidden ones outUpvotes: 2