web - How to debug functional testing with intern js -
i new functional testing , intern. can help me functional testing of web pages require authentication i.e. web pages behind session. have installed selenium web driver , able test login page , static pages without issues.
e.g. /myproj/login
login page. able test it. when trying test /myproj/home/index
browser redirecting login page. want test page should steps? code snippet create things clear.
registersuite({ name: 'demo', 'submit form': function () { remote = this.remote; homecoming remote .get(require.tourl('https://localhost/login')) .findbyid('username') .click() .type('test') .end() .findbyid('password') .click() .type('test123') .end() .findbyname('submit') .click() .end() .then(polluntil('return document.getelementbyid("osp_homepage_metric_selection_bar");', 30000)) .findbyid('osp_show_help_popup_trigger_parent') .getvisibletext() .then(function(resulttext){ assert.equal(resulttext, '<i class=" icon-question-sign"></i>','test failed!!!'); }); }, 'landing page': function () { homecoming remote .setfindtimeout(infinity) .findbyid('show_help_popup_trigger_parent') .getvisibletext() .then(function (resulttext) { assert.equal(resulttext, '<i class=" icon-question-sign"></i>','test failed!!!'); }); } });
thanks in advance
manish
one possibility utilize test server doesn't require login.
another alternative login site in functional test. fill in username , password (or whatever utilize login) on login page , submit it:
.findbyid('username') .type('bob123') .end() .findbyid('password') .type('somepassword') .end() .findbyid('submit') .click()
then wait page you're interested in load , go on testing:
.then(polluntil(...)) // go on testing
if login process slow, may need increment timeout test using this.async
.
testing web selenium-webdriver functional-testing intern
No comments:
Post a Comment