dalekjs / dalek-driver-sauce

[unmaintained] Sauce Labs bindings for DalekJS
MIT License
4 stars 5 forks source link

Screenshot can't be taken on sauce #12

Open amitaibu opened 9 years ago

amitaibu commented 9 years ago
module.exports = {
  'Page title is correct': function (test) {
    test
    .open('http://google.com')
    .assert.title().is('Google', 'It has title')
    .screenshot('./screenshots/google.png', '#hplogo')
    .done();
  }
};

dalek first.js -d sauce -b chrome my test will result with { '0': undefined } error

Seems that in dalek-driver-sauce/lib/commands/screenshot.js _screenshotCb is never called

amitaibu commented 9 years ago

Update: Adding a debug on Actions.prototype._addToActionQueue shows that imagecut gets wrong data for the realpath

dalek_ _user_users-imac____dalek_ _zsh_ _92x35

Changing the command to be without the selector .screenshot('./screenshots/google.png') doesn't create an error, however it doesn't create the images as-well

amitaibu commented 9 years ago

Update: I believe that once we remove the selector the image is indeed created, but never parsed

dalek first.js -d sauce -b chrome -l 5

dalek_ _user_users-imac____dalek_ _zsh_ _92x35-4

asciidisco commented 9 years ago

Thank you for the very! detailed bug report, that helps a lot. Will look into this.

amitaibu commented 9 years ago

@asciidisco thanks! I'd love to integrate dalek with Shoov :)