webdriverio: [π Bug]: W9 | unable to access element object properties e.g. ele.click() inside a method
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
9
Node.js Version
20
Mode
WDIO Testrunner
Which capabilities are you using?
No response
What happened?
Iβm able to access element object properties e.g. ele.click() with locator. See below image, If I hover on click method it show the details. Also, Visual Studio ID show the suggestions when press the . (dot)
But when a method accept element as a parameter and try to access its properties its not showing. Somehow the type is any now.
In the submit() method element signature is as below (property) FormPage.submitButton: ChainablePromiseElement
but in submitClick() method element signature is as below (parameter) ele: any
(parameter) ele: any
Note: created methods to show issues only
What is your expected behavior?
If element passed as a ChainablePromiseElement parameter, all the properties should be accessible inside the method
How to reproduce the bug.
create a method which accept ChainablePromiseElement as a parameter and see the type is any. Also in ID we are not able to access methods e.g. ele.click()
Relevant log output
NA
Code of Conduct
- I agree to follow this projectβs Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (18 by maintainers)
Great to hear π