Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

save and compare screenshots for mobiles using appium not supported #145

Open
ghost opened this issue Mar 16, 2016 · 3 comments
Open

save and compare screenshots for mobiles using appium not supported #145

ghost opened this issue Mar 16, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 16, 2016

Trying to make a visual comparison of the whole screen for an iphone 4s using appium and webdriverio/webdrivercss

My code:

var webdriverio = require('webdriverio'),
    webdrivercss = require('webdrivercss');

var client = webdriverio.remote({
    port: 4723,
    desiredCapabilities: {
        'browserName': '',
        'appiumVersion': '1.4.13',
        'deviceName': 'iPhone 4s',
        'device-orientation': 'portrait',
        'platformVersion': '9.2',
        'platformName': 'iOS',
        'app': '/absolute path to app/myApp.app'
    }
});

webdrivercss.init(client, {
    screenshotRoot: '../screenshots/moi',
    failedComparisonsRoot: '../screenshots/moi/diff',
    updateBaseline: true
});

client
    .init()
    .webdrivercss('moi', {
        name: 'moi',
        x: 0,
        y: 0,
        width: 320,
        height: 480
    }
    , function (err, res) {
        if(err)
        console.log("err..." + err);
        if(res)
        console.log("res..." + res);
    })
    .end();

console output:

RuntimeError: RuntimeError
     (JavaScriptError:17) An error occurred while executing user supplied JavaScript.
     Problem: An error occurred while executing user supplied JavaScript.

     Callstack:
     -> execute([Function])
     -> saveDocumentScreenshot("../screenshots/moi/moi.png")
     -> webdrivercss("moi",{"name":"btn","x":0,"y":0,"width":320,"height":480})

@christian-bromann maybe any idea?

@ghost
Copy link
Author

ghost commented Apr 13, 2016

@christian-bromann any update regarding this new feature "Webdrivercss for native app testing"

@christian-bromann
Copy link
Contributor

@cwandja yes we set the corner stone with recent updates in WebdriverIO. We will updating this project soon.

@ghost
Copy link
Author

ghost commented Apr 13, 2016

@christian-bromann can you please leave a comment here when it is done? cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant