by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:53
    alecf reopened #5874
  • 17:53
    alecf commented #5874
  • 17:51
    alecf closed #5874
  • 17:51
    alecf commented #5874
  • 17:41
    alecf commented #5874
  • 17:39
    alecf commented #5809
  • 16:45
    mgrybyk commented #5876
  • 15:23
    SkylerGrail commented #5876
  • 15:13
    SkylerGrail commented #5876
  • 14:44
    Achder commented #5880
  • 14:40
    Achder edited #5880
  • 14:38
    mgrybyk closed #5880
  • 14:38
    mgrybyk commented #5880
  • 14:36
    mgrybyk commented #5247
  • 14:33
    Achder opened #5880
  • 14:06
    Kriskof commented #5247
  • 12:53
    christian-bromann commented #5879
  • 09:14
    mgrybyk edited #5879
  • 09:14
    mgrybyk labeled #5879
  • 09:14
    mgrybyk labeled #5879
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.
I never make e2e tests before. Someone can help?
csoete
@csoete

Did you already write tests?

other tests?

The wdio runner currently supports Mocha, Jasmine (v2.0) and Cucumber.
Lucas N. Munhoz
@lnmunhoz
yes
but not in javascript
csoete
@csoete
Than you first have to chose a test framework
like mocha.js for example
Slava
@ButuzGOL
Hey! Have a question how can I run only one feature from cucumber ?
Kishore Kanna S
@skishorekanna
Hi, I am facing issue with lauching nw.exe using webdriverio
I started the java standalone server
then used webdriverio commands
running some tests using mocha
I am observing no errors but application is not launching
how can i debug this issue ?
I have seen the same setup running 5 months back. But not sure of the versions of webdriverio and mocha used that time. Now the same setup is not working with the new versions of webdriverio and mocha.
Also I have tried downloading the latest versions of selenium standalone server and chrome driver.
Eyal Zekaria
@eyalzek
If anyone is available, I would love some help with the custom commands. Since updating to v3 it seems like things have changed and I'm not sure about the correct syntax.
Slava
@ButuzGOL
How can I do debugging wdio config.js --debug not working &
?
csoete
@csoete
@eyalzek whats the problem with the syntax provided in the docs?
Tony Keith
@onewithhammer
Hi webdriverio team - I have been using mocha and grunt + grunt-webdriver as the runners. I finally had time to review and test wdio...nice job. Works very well, easy to configure and runs more than 1 test at a time. Once again...nice work!
Eyal Zekaria
@eyalzek
I'm facing cases where the some steps start executing before the previous step has returned. Am I required to have a return statement in the custom command so I can use .then()?
Obviously I might have written it wrong, the move to v3 didn't go smoothly
csoete
@csoete
@eyalzek you need to return a promise or call done at the end of the test
Miguel Rivera
@miguelrivera
Hey guys,
The WDIO runner has a screenshotPath: <PATH> setting, but... i dont seem to get any pictures saved in the directory I specify. Need I do something to get it to work?
Miguel Rivera
@miguelrivera
Also, how about triggering mouseover, mousemove etc. event? Has anyone successfully managed to handle those with WebdriverIO and phantomjs?
ariya/phantomjs#10491
Miguel Rivera
@miguelrivera
@csoete the first link tells you to use jquery to trigger it, can I hi-jack that call thru the driver?
csoete
@csoete
@miguelrivera you can execute in the browser context using http://webdriver.io/api/protocol/execute.html
Spenser Jones
@SpenserJ

I'm looking to accomplish something similar to webdriverio/webdriverio#428, where I don't have to chain the client variable. The reason for this is that I have multiple files that all need to act on the browser client, without interrupting each other. If I have three different files call

client
  .url('http://example.com/some-unique-path')
  .url(function (err, res) { console.log('Loaded ' + res.value); })

I want the first file to call it to load a URL and log the value before the second file's URL is loaded up. Is there a clean way of writing this, or am I forced to find a way to pass a single object back and forth between files?