Skip to content

Instantly share code, notes, and snippets.

@eyalzek
Created March 23, 2016 11:26
Show Gist options
  • Save eyalzek/5390e856ba180f49eced to your computer and use it in GitHub Desktop.
Save eyalzek/5390e856ba180f49eced to your computer and use it in GitHub Desktop.
wdio-after-issue
// test file:
describe('Suite name', function() {
it('Should work', function() {
return browser
.url('https://google.com')
.pause(2000)
});
});
// `after` callback:
after: function(done) {
console.log(browser);
return browser
.waitForVisible('body', 5000)
.click('body');
}
// console output:
[12:24:20]: COMMAND POST "/wd/hub/session"
[12:24:20]: DATA {"desiredCapabilities":{"browserName":"chrome","version":"","javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"platform":"ANY","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"3.4.0","name":"webdriverio"}}}
[12:24:20]: SET SESSION ID 5533d2d0-2d11-4ef6-b21f-ea2034393173
[12:24:20]: RESULT {"platform":"LINUX","acceptSslCerts":true,"javascriptEnabled":true,"browserName":"chrome","chrome":{"userDataDir":"/tmp/.com.google.Chrome.hToxO3"},"rotatable":false,"locationContextEnabled":true,"mobileEmulationEnabled":false,"webdriver.remote.sessionid":"5533d2d0-2d11-4ef6-b21f-ea2034393173","version":"49.0.2623.87","takesHeapSnapshot":true,"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"browserConnectionEnabled":false,"nativeEvents":true,"webStorageEnabled":true,"hasTouchScreen":false,"applicationCacheEnabled":false,"takesScreenshot":true}
[12:24:21]: COMMAND POST "/wd/hub/session/5533d2d0-2d11-4ef6-b21f-ea2034393173/url"
[12:24:21]: DATA {"url":"https://google.com"}
[12:24:21]: RESULT null
[12:24:23]: COMMAND DELETE "/wd/hub/session/5533d2d0-2d11-4ef6-b21f-ea2034393173"
[12:24:23]: DATA {}
[12:24:23]: RESULT null
{ state: 'fulfilled', value: undefined }
[12:24:23]: ERROR ServerError Promise was fulfilled but got rejected with the following reason: Error: A session id is required for this command but wasn't found in the response payload
CommandError: Promise was fulfilled but got rejected with the following reason: Error: A session id is required for this command but wasn't found in the response payload
at saveScreenshot("/home/eyal/Documents/code/work/webdriverio-mocha/errorShots/ERROR_chrome.any_2016-03-23T11-24-23.894Z.png") - safeExecute.js:19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment