Issue Description
After upgrading to recent versions of expect-webdriverio (used with WebdriverIO 9.24.0), the following assertion consistently fails:
await expect(toto).not.toBeDisplayed();
The error returned is:
Error: Timeout of 120000ms exceeded.
However, these two variants work correctly:
await expect(toto).not.toBeDisplayed({ wait: 0 })
await expect(toto).not.toBeDisplayed({ wait: 200 })
This means the assertion only passes when an explicit wait option is provided, even though the element is already not displayed at the time of the check.
Expected Behavior
await expect(toto).not.toBeDisplayed()
➡ should pass without requiring { wait: X } when the element is already not visible.
According to the project documentation and recent changes to expect‑webdriverio, the .not modifier is supposed to wait for the negated condition to become true:
“.not should also wait for conditions (Breaking changes…)”
af8d5e5
Therefore, no additional { wait: X } parameter should be required.
Thank you in advance for looking into the issue.
Issue Description
After upgrading to recent versions of expect-webdriverio (used with WebdriverIO 9.24.0), the following assertion consistently fails:
await expect(toto).not.toBeDisplayed();The error returned is:
Error: Timeout of 120000ms exceeded.However, these two variants work correctly:
await expect(toto).not.toBeDisplayed({ wait: 0 })await expect(toto).not.toBeDisplayed({ wait: 200 })This means the assertion only passes when an explicit wait option is provided, even though the element is already not displayed at the time of the check.
Expected Behavior
await expect(toto).not.toBeDisplayed()➡ should pass without requiring { wait: X } when the element is already not visible.
According to the project documentation and recent changes to expect‑webdriverio, the .not modifier is supposed to wait for the negated condition to become true:
“.not should also wait for conditions (Breaking changes…)”
af8d5e5
Therefore, no additional { wait: X } parameter should be required.
Thank you in advance for looking into the issue.