Closed christian-bromann closed 7 years ago
From @msegado on October 6, 2016 22:13
@gsccheng, do you have screenshots enabled? I'm wondering if this is the same underlying issue as #1591.
Thanks for addressing my issue.
Following #1591 I've commented out screenshotPath
and also tried setting it to a nonexistent path and either way still produces the same problem the majority of the time. Yes, in a minority of the time I would get the report as expected so the problem doesn't occur all the time.
I was looking into this but I have a hard time reproducing this. @gsccheng is this still an issue? If so could you try this code and share the output?
// features/step_definitions/auth.js
this.Given(/^this should work$/, function () {
try {
browser.url('https://google.com');
var source = browser.getSource();
expect('foo').to.exist;
} catch (e) {
console.log('Error: ', e);
throw e;
}
});
Thanks for looking into this. Since I've had this problem, I ended up switching to a new computer, and updating all the relevant dependencies. I'm not sure what caused it, but I've just finished all my UI-tests without any problems. This can be closed.
@gsccheng glad everything worked out.
From @gsccheng on September 24, 2016 23:10
The problem
I'm not sure where to post this issue but I'll start here at the top level since I use the wdio test runner with Cucumber.
I think I may be getting a race condition where my spec reporter doesn't always show the test result because the runner is ending prematurely. It seems to only occur when there are multiple browser commands, whether they are in the same step definition or not.
Environment
Code To Reproduce Issue
I simplified my code into these code snippets. I'm wondering if anyone can reproduce this.
Here's my gist to the config file
Now if I remove the second command of
browser.getSource()
, I am able to complete the test properly: So,gives:
Copied from original issue: webdriverio/webdriverio#1611