Hi,
I want to read innerHTML of n element using Protractor for _non-angular_ pages.
I have tried
browser.driver.findElement(by.xpath("xpath")).getText());
browser.driver.findElement(by.xpath("xpath")).innerHTML;
However, both of them do not seem to work. They are giving the following output:
{ then: [Function: then],
cancel: [Function: cancel],
isPending: [Function: isPending] }
Thanks,
Sakshi
The result is a promise. Please take a look at the documentation to understand how to work with protractor promises: http://angular.github.io/protractor/#/control-flow
Closing as this is an answered question.
Most helpful comment
The result is a promise. Please take a look at the documentation to understand how to work with protractor promises: http://angular.github.io/protractor/#/control-flow
Closing as this is an answered question.