Protractor: Read innerHTML of an element using Protractor for non-angular pages

Created on 5 Sep 2014  路  1Comment  路  Source: angular/protractor

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

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gamecheck80 picture gamecheck80  路  3Comments

mvolkmann picture mvolkmann  路  3Comments

vishalshivnath picture vishalshivnath  路  3Comments

codef0rmer picture codef0rmer  路  3Comments

juliemr picture juliemr  路  3Comments