How to identify this element in the protractor?

When I look at the details of some customers, I see the customer information displayed at the bottom. I believe this comes from the JSON call.

How do you define this element? I tried className but didn't work. Thank you for your help. And tried this css. .override-info hide-mobile ng-scope

... I need to assert name matches with John Grish

:

<div class="override-info hide-mobile ng-scope" ng-if="overrideCustInfo">
    <p class="override-info-title">You are viewing</p>
    <p class="override-info-dtl ng-binding">John Grish</p>
    <p class="override-info-dtl ng-binding">1177 Montogomery st</p>
    <p class="override-info-dtl ng-binding">San Francisco, CA</p>
</div>

      

+3


source to share


1 answer


You can rely on class names:



expect(element
    .all(by.css("div.override-info p.override-info-dtl"))
    .first().getText()
).toEqual("John Grish");

      

+3


source







All Articles