GithubHelp home page GithubHelp logo

Comments (3)

christian-bromann avatar christian-bromann commented on July 17, 2024

var newbrowser = webdriverio.remote(browser.options).init();
return newbrowser
.url(browser.options.baseUrl + variables.url.home)

Why do you create your own instance? This is done by the wdio test runner

Error 2 : browser.url(...).click(...).click(...).click(...).waitForVisible(...).click is not a function

Are you executing your tests in sync or async mode?

Error 3 : done is not a function

Seems you executing it in sync mode. In this case we don't provide a done function because there is no need for it if all commands getting executed in sync mode

from gulp-webdriver.

Johan22 avatar Johan22 commented on July 17, 2024

Why do you create your own instance? This is done by the wdio test runner
=> We thought it was mandatory to create a new instance for each test requiring a session id (such as login test). But I tried to use directly the browser instance for the login test and it seems to work properly so I can change that...

Are you executing your tests in sync or async mode?
=> I think I understand why all my tests fails. With the 1.0.3 version of gulp-webdriver, my tests were asynchronous. I could chained multiples click for examples. But when I upgrade to the gulp-webdriver 2.0.1, all my tests become synchronous and I need to change the syntax to make them work (I have to do browser.click(); browser.click(); instead of browser.click().click()...).

So now my question is how can I switch from async to sync and vice versa ? Which is the best mode in your opinion?

Thanks

from gulp-webdriver.

christian-bromann avatar christian-bromann commented on July 17, 2024

So now my question is how can I switch from async to sync and vice versa ?

There is a flag in your config file called sync, please see http://webdriver.io/guide/testrunner/configurationfile.html

Which is the best mode in your opinion?

Use synchronous mode, it helps to write good tests

Ok I don't think anything is wrong with the package. Closing

from gulp-webdriver.

Related Issues (20)

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.