Giter VIP home page Giter VIP logo

Comments (6)

christian-bromann avatar christian-bromann commented on August 23, 2024

From @mgrybyk on March 12, 2019 16:39

If you talking about webdriverio 5 (5.7.2), then

  1. add commands
browser.addCommand("browserLevel", function () { ... })
browser.addCommand("elementLevel", function () { ... }, true)
  1. add typings for new commands
declare namespace WebdriverIO {
    interface Browser {
        browserLevel (): void
    }

    interface Element {
        elementLevel (): void
    }
}

NOTE
At this moment there is no way to override commands, there is planned work to do it #3604

from v4.

christian-bromann avatar christian-bromann commented on August 23, 2024

From @draganrakas on March 12, 2019 17:1

@mgrybyk We're currently using Webdriver 4.x due to compatibility issues with TypeScript & Cucumber. Is there an equivalent for 4.x?

Edit: just checked the codebase, looks like addCommand exists in 4.x as well.

from v4.

christian-bromann avatar christian-bromann commented on August 23, 2024

From @mgrybyk on March 12, 2019 18:51

At this point I can't help you, I was using v4 with js.

from v4.

christian-bromann avatar christian-bromann commented on August 23, 2024

@mgrybyk if people use addCommand can they somehow extend the existing typescript definition with their command?

from v4.

christian-bromann avatar christian-bromann commented on August 23, 2024

From @mgrybyk on March 13, 2019 15:18

Yes, in v5, as it mentioned here webdriverio/webdriverio#3719 (comment)

from v4.

christian-bromann avatar christian-bromann commented on August 23, 2024

Ah ok, now I see that @draganrakas is using v4. Moving the issue there then.

from v4.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.