Skip to content

[🐛 Bug]: Webdriverio.Element has types issues #11582

@Pawel1894

Description

@Pawel1894

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

latest

Mode

Standalone Mode

Which capabilities are you using?

-

What happened?

It looks like Webdriverio.Element has wrong typings. It allows us to run some functions that does not exists in Webdriverio.Element.

Example that I found is execute function. I spoke to Erwin about that and it seems like there is more browser commands that are in Webdriverio.Element typings.

What is your expected behavior?

Remove typings of functions that does not exists on Webdriverio.Element.

How to reproduce the bug.

    await browser.url('https://webdriver.io')
    const el = await browser.$$('.prism-code.language-js.codeBlock_bY9V.thin-scrollbar')[0]
    
    const cssValue = await el.execute(
        (el, pseudoElement, cssProperty)=> (window.getComputedStyle(el, pseudoElement) as any)[cssProperty],
        el,
        '::before',
        'width'
    )

Relevant log output

-

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

No one assigned

    Labels

    Bug 🐛good first picka reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions