-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Bug 🐛help wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
v9.20.0
Node.js Version
v20.19.1
Mode
Standalone Mode
Which capabilities are you using?
What happened?
TypeScript compiler will produce error for the following code:
const element = $('.class');
const html: string = element.getHTML(); # <--- TS2322This is broken since v9:
- https://npmdiff.dev/webdriverio/9.0.0/8.46.0/package/build/commands/element/getHTML.d.ts
- https://npmdiff.dev/webdriverio/9.20.0/8.46.0/package/build/commands/element/getHTML.d.ts
What is your expected behavior?
WebdriverIO.Element.getHTML() should return string
How to reproduce the bug.
https://stackblitz.com/edit/vitejs-vite-aq6xi9tf?file=main.ts&view=editor
Relevant log output
main.ts:2:7 - error TS2322: Type 'Promise<any>' is not assignable to type 'string'.
2 const html: string = element.getHTML();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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug 🐛help wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested