Sunday, 15 June 2014

jasmine - ptor.findElements always returns true -



jasmine - ptor.findElements always returns true -

i have next code, never runs error portion

ptor.findelements(protractor.by.css(elementcss)).then(function (elems) { element = elems; elementfound = true; // if element.all(...).count() console.log("inside clause , element found"); }, function (err) { console.error("waiting element( " + elementcss + " ) found " + currentcount + "/" + timeout); }); //ptor.findelement

even if elementcss ='abc', junk value, resolve clause , not reject/error junk css name.

findelement on other hand behaves expected. missing here ?

the api findelement returns en error if element not found given selector.

the api findelements homecoming empty list if selector not match element.

from findelement documentation :

if element cannot found, bot.errorcode.no_such_element result returned driver

jasmine protractor

No comments:

Post a Comment