Have you read the Contributing Guidelines on issues?
WebdriverIO Version
9.23.2
Node.js Version
v24.13.0
Mode
Standalone Mode
Which capabilities are you using?
No response
What happened?
Upgrading expect-webdriverio from from 5.6.1 to 5.6.3 makes toBeElementsArrayOfSize throw an error in some cases:
TypeError: Cannot read properties of undefined (reading 'options')
What is your expected behavior?
No response
How to reproduce the bug.
describe("toBeElementsArrayOfSize", () => {
it("should work", async () => {
await browser.url("https://webdriver.io/");
// throws TypeError: Cannot read properties of undefined (reading 'options')
await expect($$("a.button")).toBeElementsArrayOfSize({gte: 1000});
});
});
Note that using the correct value in the expectaction seem be working fine 🤷 :
describe("toBeElementsArrayOfSize", () => {
it("should work", async () => {
await browser.url("https://webdriver.io/");
// works fine
await expect($$("a.button")).toBeElementsArrayOfSize({gte: 4});
});
});
Relevant log output
TypeError: Cannot read properties of undefined (reading 'options')
Code of Conduct
Is there an existing issue for this?
Have you read the Contributing Guidelines on issues?
WebdriverIO Version
9.23.2
Node.js Version
v24.13.0
Mode
Standalone Mode
Which capabilities are you using?
No response
What happened?
Upgrading expect-webdriverio from from 5.6.1 to 5.6.3 makes
toBeElementsArrayOfSizethrow an error in some cases:What is your expected behavior?
No response
How to reproduce the bug.
Note that using the correct value in the expectaction seem be working fine 🤷 :
Relevant log output
Code of Conduct
Is there an existing issue for this?