by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 23:41

    christian-bromann on master

    Have `remote` and `multiremote`… (compare)

  • 23:41

    christian-bromann on cb-typedef-fix

    (compare)

  • 23:41
    christian-bromann closed #5599
  • 23:41
    christian-bromann unlabeled #5599
  • 23:41
    christian-bromann labeled #5599
  • 23:40
    christian-bromann commented #5600
  • 23:37
    christian-bromann commented #5601
  • 20:21
    pjcalvo closed #5601
  • 20:21
    pjcalvo commented #5601
  • 18:53
    t0lkman opened #5601
  • 17:30
    mohanraj-r commented #5597
  • 16:25
    GeorgeXCV commented #5600
  • 15:30
    anshulrgoyal commented #5522
  • 15:22
    anshulrgoyal commented #5522
  • 15:06
    christian-bromann commented #5446
  • 14:54
    christian-bromann assigned #5599
  • 14:54
    christian-bromann unlabeled #5477
  • 14:54
    christian-bromann unlabeled #5584
  • 14:54
    christian-bromann unlabeled #5472
  • 14:53
    christian-bromann unlabeled #5471
Christian Bromann
@christian-bromann

Anyone who's has tried to trigger client side events? For instance to trigger the change event on a certain <input>?

nope, you can inject javascript to trigger it, using addCommand you can make yourself handy commands to invoke different events. Wondering if something like a trigger command would be useful that would fullfil such thing (would only work in desktop browser though)

I'm running WDIO with cucumber. For debugging purposes, what's the best way to make it not close the browser when the test fails?

make use of the debug command: http://webdriver.io/api/utility/debug.html .. it let you jump into the browser before an assertion

Christian Bromann
@christian-bromann
@jaroslav-kubicek in v3 please use promises to handle errors:
it('wait for load', function(done) {
  client.waitForExist('selector').catch(done).call(done);
});
more convenient:
function seal(cb) {
    return function() {
     cb();
   }
}

it('wait for load', function(done) {
  client.waitForExist('selector').then(seal(done), done);
});
Jaroslav Kubíček
@jaroslav-kubicek
great, that’s enough, thanks!
Miguel Rivera
@miguelrivera
@christian-bromann when it comes to passing in custom parameters to the wdio runner...? Do you have any tips? I'd like to pass in user/pass for different environments... or is it possible to access the wdio runner configuration at runtime?
Christian Bromann
@christian-bromann

or is it possible to access the wdio runner configuration at runtime?

No

when it comes to passing in custom parameters to the wdio runner…?

I recommend to have a common config file that contains all things that don’t change in your environments. Then have a config file for each of them and require your main config file and merge your common configs with your env specific configs

Dan Dascalescu
@dandv
Regarding merging config files: webdriverio/cucumber-boilerplate#1
Vyacheslav Slinko
@vslinko
is it possible to configure Accept-Language header?
Dan Dascalescu
@dandv
@christian-bromann If https://github.com/webdriverio/cucumber-boilerplate is meant for Cucumber, why does it use Mocha and Chai?
Dan Dascalescu
@dandv
  1. This code is pretty nice,
    it('should test something', function(done) {
    return client.click('#button').getValue('#someInput').then(function(value) {
     expect(value).to.be.exactly('some value');
    });
    });
    But what is the closest to return client.click('#button').getValue('#someInput') === 'some value' ?
Christian Bromann
@christian-bromann

is meant for Cucumber, why does it use Mocha and Chai?

it’s using yadda to enable cucumber like testing but in the background it is using mocha and chai for assertions

if you use cucumberjs you probably want to use an additional assertion library as well

But what is the closest to return client.click('#button').getValue('#someInput') === 'some value’ ?

we will probably get to a point where this is gonna be possible

Vyacheslav Slinko
@vslinko

is it possible to configure Accept-Language header?

@christian-bromann

Christian Bromann
@christian-bromann
you can do:
it('should test something', function(done) {
    yield client.click('#button’);
    expect(yield client.getValue('#someInput’)).to.be.exactly('some value');
});
@vslinko you mean for request in the browser?
Dan Dascalescu
@dandv
I thought CucumberJS included its own assertion library? http://custardbelly.com/blog/blog-posts/2014/01/08/bdd-in-js-cucumberjs/
Christian Bromann
@christian-bromann
cucumber-js does but not yadda
Dan Dascalescu
@dandv
I see. Is there an article I can read about the reasons for preferring yadda over cucumber for the boilerplate?
Christian Bromann
@christian-bromann
as I started to put this together I preferred yadda because they supported step tables
by now I guess both libraries are equally good
personally I like the the yadda code base more
Dan Dascalescu
@dandv
Yadda's README says "Yadda brings true BDD to JavaScript test frameworks such as Jasmine, Mocha, QUnit, Nodeunit, WebDriverJs and CasperJS.". Is WebDriverJS a test framework?
Vyacheslav Slinko
@vslinko
@christian-bromann yes, for request
Christian Bromann
@christian-bromann
maybe using a browser flag but not with Selenium

Is WebDriverJS a test framework

I would say no, it is a tool for e2e testing

Jaroslav Kubíček
@jaroslav-kubicek
Sadly, I’m back with waitForExist, I still struggle with it when provided selector doesn’t exist, in 2.4.0 promise is resolved successfully and it returns false as a result. In 3.x it’s also resolved successfully, but result is undefined:
var cb, options, webdriverio, client;
webdriverio = require('webdriverio');
options = {desiredCapabilities: {browserName: 'chrome'}};
client = webdriverio.remote(options);

cb = function (success) {
  return function (result) {
    console.log(success, result);
    return client.end();
  };
};

client.init()
  .url('http://www.google.com/')
  .waitForExist('div.nonsense')
  .then(cb('success'), cb('fail'));
Radim Daniel Pánek
@rdpanek
@jaroslav-kubicek +1
Christian Bromann
@christian-bromann
@jaroslav-kubicek this seems like a serious bug, could you please file an issue?
Jaroslav Kubíček
@jaroslav-kubicek
yep, wait a moment..
Miguel Rivera
@miguelrivera
is there an onError hook for each "it" in mocha? Do you guys know?
Christian Bromann
@christian-bromann
you can catch errors with
browser.on(‘error’, function(e) {….
Miguel Rivera
@miguelrivera
oh, cool, and that can be hooked up on the before in the wdio.conf.js i guess
Christian Bromann
@christian-bromann
yes sir :wink:
Miguel Rivera
@miguelrivera
        browser.on("error", function(e) {
            browser.saveScreenshot();
        });
Should that be a bad idea?
Miguel Rivera
@miguelrivera
    // Saves a screenshot to a given path if a command fails.
    screenshotPath: 'shots',
Will that be done out of the box?
I mean, will the runner save pictures by default?
Robin Jakobsson
@rjakobsson
I'm currently hitting this issue: https://groups.google.com/forum/#!topic/webdriverio/b7cFK-4Qwo4 when using the xolvio:cucumber package for Meteor. Thinking that it should be related to webdriverio, I'm posting here. Here's a brief description of the error text I'm receiving: xolvio/meteor-cucumber#187
Christian Bromann
@christian-bromann
@miguelrivera yes
if a command fails for some reason (assertion failed) it should make a screenshot before printing the error
@rjakobsson since you already opened that issue, let’s continue convo there
Robin Jakobsson
@rjakobsson
@christian-bromann ok!
Krishna Rajendran
@blazzy
When I use the mocha framework with the wdio test runner is there a way to pass additional command line flags or options to mocha?
If you want to define specific Mocha settings you can do that by adding mochaOpts to your configuration file
Not sure how I missed that on my first pass :point_up:
Christian Bromann
@christian-bromann
:+1:
Christian Bromann
@christian-bromann
hey peeps, I am gonna go on vacation for one week without any digital devices. I won’t able to answer questions until next friday. Cheers
Eli White
@TheSavior
Any ideas what might cause
Exception thrown
org.openqa.selenium.remote.SessionNotFoundException: Session ID is null. Using WebDriver after calling quit()?