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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -