Skip to content

Commit

Permalink
fix: for #234 (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmerc authored and Igor Muchychka committed Jun 26, 2017
1 parent 781e10a commit 9dfa089
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nightwatch-api.js
Expand Up @@ -129,7 +129,7 @@ module.exports = class NightwatchApi {

yield new Promise((resolve, reject) => {
this.protocol.screenshot(false, (response) => {
if (response.state !== 'success') {
if (response.state !== 'success' && response.status !== 0) {
reject(new Error('Creating screenshot was not successful. Response was:\n' + require('util').inspect(response)))
}

Expand Down

0 comments on commit 9dfa089

Please sign in to comment.