mercredi 4 novembre 2015

theintern test framework - testing iframes

im creating a platform to user automated tests to verify if a widget is functional. I already made the tutorials and the saw the examples but still i can figure out what's happening.

the widget that im trying to test is made with iframes without src attribute and with im trying to find a element inside of that iframe without src attribute.`define(function (require) { var registerSuite = require('intern!object'); var assert = require('intern/chai!assert');

registerSuite({
    name: 'index',

    'greeting form': function () {
        return this.remote
            .get(require.toUrl('localhost:3000'))
            .findById('iframeId')
            .switchToFrame('iframeId')
            .findById('buttonID');

    }
});

});`

With this code it happens that the intern runner returns a error saying that it wasn't unable to find the element. But when i try to run the same code on a iframe with a "src" attribute it finds the correct element and doesn't returns any error.

anyone could help ??

Aucun commentaire:

Enregistrer un commentaire