samedi 16 janvier 2016

protractor unknown error, removing attribute from DOM

Im new to protractor and trying to remove attribute from DOM but getting "unknown error", Im not sure what could be the problem

Im having a simple HTML with a custom directive.I am trying to remove that for my test cases to pass:

<input type="text" name="rptdate" input-date placeholder="DD-MM-YYYY" data-ng-model="newPatReports.reportDate" />

Commands I ran are:

browser.executeScript( 'document.getElementsByName("rptdate").removeAttribute("input-date")' );
browser.driver.findElement(protractor.By.name('rptdate')).removeAttr("input-date");
browser.executeScript('document.querySelector("input[name='rptdate']").removeAttribute("input-date");');

But none of them helped.

Aucun commentaire:

Enregistrer un commentaire