-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
el?.isDisplayed
is not a function
#1507
Comments
@nextlevelbeard do you have a reproducible example for it? |
Below is my reproducible code example @christian-bromann
It seems the current code accepts |
What would you think the behavior should be? Should it fail if one of the found elements are not visible? Generally we only have one matcher that allows passing in |
I used to write with Selenium, Playwright. I'm hesitant because they don't have behavior like this to check if an array is displayed.
I think it makes sense to mark the test as a failure if one of the elements is not visible.
I think for now we should improve the error messages when the function does not support taking an array element and include the documentation directly into the types file. That could help users (including myself) better understand how to use the matchers. |
Maybe we can do this for all matchers that expect that? Like having a |
I'd like to mention that the types file suggests, that these matchers should work with interface Matchers<R, T> {
// ===== $ or $$ ===== // << HERE IT IS
/**
* `WebdriverIO.Element` -> `isDisplayed`
*/
// ...
} |
@htho this is due to the fact that we don't have a better type for these matchers as we currently support matchers for single elements ( |
Ah. I did not make it clear. It's not about the type definition itself. I meant the normal comment on the first line of the interface. L491 says the following section is But L156 claims it is about Yes - those are not type comments, but I like to look at the |
This doesn't seem correct to me, not sure for what this stands for or if there was a plan to support |
Versions: latest webdriverio + latest expect-webdriverio, TS 5.4.3
Trigger
await expect(await $$('.item')).toBeDisplayed();
Logs:
The text was updated successfully, but these errors were encountered: