Protractor: convert webElement to elementFinder -
the element.all() returns array of webelements. i'd able further process these elements. example element.all(by.something()).each(function(row) { var button = row.element(by.buttonwithtext("cancel")).then(....
but of course, can't use row.element because row webelement, not elementfinder.
is there easy way of converting webelement elementfinder?
i thinking of getting xpath webelement using by.xpath() seems overkill.
i'm pretty sure that's ok or try this
ptor.findelements(protractor.by.tag('tr')).then(function(rows){ rows[0].findelement(protractor.by.linktext('something')).click(); });
that should work want use structure in few places. if use findelement work in same way wouldn't array ..rows.findelement..etc
Comments
Post a Comment