soda/selenium how to log an assert -
i'm sort of new selenium , soda love ability run selenium node. bear me ask basic question.
this simple login chain i'm running in script.
browser .click('css=a#loginbutton') .type('css=input.input-medium.email',user) .type('css=input.input.pwd',pass) .clickandwait('css=a.btn.login') .assertextpresent('clients','logged in ok') //client page reached
however message 'logged in ok' not spitting out anywhere. i'm basic thing i'm missing here there has way spit out progress messages i'm running test script. script has become huge, it's not easy track down errors when occur. i'd sort of log success errors.
doh! it's function not string.
for else wondering. here's solution:
browser .click('css=a#loginbutton') .type('css=input.input-medium.email',user) .type('css=input.input.pwd',pass) .clickandwait('css=a.btn.login') .asserttextpresent( 'clients', function () { console.log('logged in ok') }); //client page reached
Comments
Post a Comment