javascript - protractor unknown error, removing attribute from DOM -


im new protractor , trying remove attribute dom getting "unknown error", im not sure problem

im having simple html custom directive.i trying remove test cases pass:

<input type="text" name="rptdate" input-date placeholder="dd-mm-yyyy" data-ng-model="newpatreports.reportdate" /> 

commands 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.

locate element protractor , pass web element script:

var elm = element(by.name("rptdate"));  browser.executescript('arguments[0].removeattribute("input-date");', elm.getwebelement()); 

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -