Skip to content

[🐛 Bug]: Swipe method will not recognize scrollableElement if user pass it as variable and also type error  #14019

@Dinh246

Description

@Dinh246

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

9.5

Node.js Version

22.12

Mode

Standalone Mode

Which capabilities are you using?

No response

What happened?

Screenshot 2025-01-01 at 11 12 36 When using swipe method I passed scrollableElement as variable the code not work and returned an error `Error: Malformed type for "elementId" parameter of command getElementRect Expected: string Actual: object` Also as in the image the scrollEle also has type error even when it's the same as the doc example `Type 'ChainablePromiseElement' is not assignable to type 'Element'. Types of property 'parent' are incompatible. Type 'Promise' is not assignable to type 'Browser | Element'.ts(2322)`

What is your expected behavior?

No response

How to reproduce the bug.

declare the scrollableElement as variable and pass that variable into swipe method

Relevant log output

Error: Malformed type for "elementId" parameter of command getElementRect
Expected: string
Actual: object

For more info see https://w3c.github.io/webdriver/#dfn-get-element-rect

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions