Why does chaining selectors in Protractor return false when using isPresent
问题 So I'm writing automation tests for Ionic 2/Angular 2 and I have DOM element that looks like this <ion-segment-button class="segment-button segment-activated" role="button" tappable="" value="orders" aria-pressed="true"> and I've created a page object that looks like this: ordersButton: element(by.css('[value="orders"]')), and in my spec file my test step looks like so expect((orders.header.ordersButton).element(by.css('.segment-activated')).isPresent()).toBeTruthy(); this returns false and I