by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 12 19:18
    wbigno opened #5726
  • Aug 12 15:38
    marseam synchronize #5653
  • Aug 12 15:30
    marseam synchronize #5653
  • Aug 12 14:44
    vikash90 opened #5725
  • Aug 12 14:43
    vikash90 opened #5724
  • Aug 12 08:39
    HananArgov edited #5723
  • Aug 12 08:21
    HananArgov opened #5723
  • Aug 12 06:11
    stevoland commented #5702
  • Aug 12 00:29
    joscha commented #4974
  • Aug 12 00:03
    abubakarafzal commented #4974
  • Aug 11 20:26
    iboshkov edited #5722
  • Aug 11 20:26
    codecov[bot] commented #5040
  • Aug 11 20:26
    codecov[bot] commented #3148
  • Aug 11 20:26
    jsf-clabot commented #5722
  • Aug 11 20:25
    iboshkov edited #5722
  • Aug 11 20:25
    iboshkov edited #5722
  • Aug 11 20:25
    iboshkov edited #5722
  • Aug 11 20:25
    jsf-clabot commented #5722
  • Aug 11 20:25
    iboshkov opened #5722
  • Aug 11 18:14
    mikesalvia edited #5721
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()?
Dan Dascalescu
@dandv
Enjoy, @christian-bromann !
Miguel Rivera
@miguelrivera
@christian-bromann has #215 been resolved? It's closed, but the bug's still there
csoete
@csoete
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
Tony Keith
@onewithhammer
@TheSavior - you are trying to use webdriver after calling quit(). I had this problem using grunt-webdriver plugin. The plugin will call quit for you. Please check to make sure you aren't calling quit before test are complete.
Slava
@ButuzGOL
Hello Can anybody help me how can I prevent error on waitForExist ?
Miguel Rivera
@miguelrivera
@ButuzGOL what is the error?
Slava
@ButuzGOL
Error: element (#sessions-concurrent-modal .modal) still not visible after 5000ms
The problem is that I can show one of two dom items and I need to handle only one which will be shown
csoete
@csoete
just add catch(function() {}); to each call, I think...
the best way would probably be to use two deferreds and reject each on catch and q.any to resolve a combination of both promises
return q.any([isFirstVisible, isSecondVisible)
something like that
csoete
@csoete
@ButuzGOL
 var isVisible1 = q.defer();
 var isVisible2 = q.defer();
 var isAnyVisible = q.any([isVisible1.promise, isVisible2.promise]);

this.waitForVisible('#sessions-concurrent-modal .modal', 5000)
  .click('#sessions-concurrent-modal [data-action=force-submit]')
  .waitForExist('body>#main', 5000)
  .then(function() {
    isVisible1.resolve(true);
  })
  .catch(function() {
    isVisible1.reject();
  });

this.waitForExist('body>#main', 5000)
  .then(function() {
    isVisible2.resolve(true);
  })
  .catch(function() {
    isVisible2.reject();
  });
return isAnyVisible;
Slava
@ButuzGOL

Many thanks
But it still gives me error in console
Error: element (#sessions-concurrent-modal .modal) still not visible after 5000ms
at elements("#sessions-concurrent-modal .modal") at /Users/butuzgol/Playground/eclm-hot-test/node_modules/webdriverio/lib/commands/isVisible.js:41:17
at isVisible("#sessions-concurrent-modal .modal") at /Users/butuzgol/Playground/eclm-hot-test/node_modules/webdriverio/lib/commands/waitForVisible.js:36:21

Seems like catch https://github.com/webdriverio/webdriverio/blob/ce51baa448714e69f19899718236f988417b4b3d/lib/commands/waitForVisible.js#L55
still triggers

I also made using pause
.pause(1000)
.waitUntil(function() {
var defer = q.defer();

this.isVisible('#sessions-concurrent-modal .modal').then(function(value) {
  if (value) {
    this.click('#sessions-concurrent-modal [data-action=force-submit]')
    .waitForExist('body>#main', 5000)
    .then(function() {
      defer.resolve(true);
    });
  } else {
    this.waitForExist('body>#main', 5000)
      .then(function() {
        defer.resolve(true);
      });
  }
});

return defer.promise;

}, 5000)

csoete
@csoete
as an alternative try then with a second function as a reject
.then(function() {
  isVisible1.resolve(true);
},function() {
  isVisible1.reject();
});
Slava
@ButuzGOL
Many thanks for feedback it goes to the next step ok but also it shows Error: element (#sessions-concurrent-modal .modal) still not visible after 5000ms and I think to ignore it, should be done some modification in waitForVisible.js#L55
csoete
@csoete
I am pretty sure that is not the case.
Johan Thallauer
@JohanTh
would I have to use jquery to find an element by its text like <p>Text</p>?
csoete
@csoete
"p=Text"
Johan Thallauer
@JohanTh
oh, thank you :)
Lucas N. Munhoz
@lnmunhoz
Hey! I'm trying to use webdriver with meteor, but I can't find a tutorial to help me geting started.