Skip to content

Protractor Inheritance from ElementFinder class #41

Discussion options

You must be logged in to vote

You can use addCommand to add custom commands to the WebdriverIO element object. See more details on that in the docs. Then you can extend the TypeScript definition by doing:

declare global {
    namespace WebdriverIO {
        interface Element {
            elementCustomCommand: (arg: unknown) => number
        }
    }
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@NavyMint
Comment options

@hoancmg
Comment options

@NavyMint
Comment options

Answer selected by christian-bromann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants