vendredi 27 janvier 2017

Getting Started with appium and Testobject

i am getting started now with Testobject and want to use appium for it. i tried the setup as displayed on Testobject page, but i do not know how to start my test and what i may missed. i installed:

npm install appium -g

here is my config:

exports.config = {
    protocol: 'https',
    host: 'app.testobject.com',
    port: '443',
    path: '/api/appium/wd/hub',


    capabilities: [{
        testobject_api_key: 'myKey',
        testobject_device: 'LG_Nexus_4_E960_real',
        browserName: 'Chrome'
    }],

    specs: [
        '.Testspec.js'
    ],

    sync: true,
    logLevel: 'verbose',
    coloredLogs: true,
    screenshotPath: './errorShots/',
    waitforTimeout: 10000,
    connectionRetryTimeout: 10 * 60000,
    connectionRetryCount: 3,
    framework: 'mocha', //do i need this? what is needed to install?
    mochaOpts: {
        ui: 'bdd',
        enableTimeouts: false
    }
};

and here is my spec:

describe('TestObject website', function() {
    before(function() {
        browser.timeouts('implicit', 10000);
        browser.url('https://testobject.com');
    });

    it('Opens features page', function() {
        var learnMore = "//a[contains(text(), 'Learn More')]";
        browser.scroll(learnMore);
        browser.element(learnMore).click();
        var pageUrl = browser.getUrl();
        assert.equal(pageUrl, "http://ift.tt/2jblxs2")
    });
});

Now how do i start the test? i thought of something like:

appium Config.js.

Aucun commentaire:

Enregistrer un commentaire