Abbas Ali Husain
Abbas Ali Husain

Reputation: 195

How to select polymer component using protractor

Hi following is my html

    <div class="ng-scope" ng-app="app" ng-controller="Todos">
<nd-uber-bar class="ng-isolate-scope" title="Title" subtitle="subtitle">
<nd-drawer-panel id="ndDrawerPanel" class="style-scope nd-uber-bar x-scope nd-drawer-panel-0" force-narrow="" disable-swipe="" style="touch-action: auto;" narrow="" selected="drawer">

I want to validate selected="drawer" which is polymer component using protractor

Upvotes: 1

Views: 196

Answers (1)

alecxe
alecxe

Reputation: 473813

You can do it by getting the selected attribute of an element:

var polymerPanel = $('#ndDrawerPanel');
expect(polymerPanel.getAttribute("selected")).toEqual("drawer");

Upvotes: 1

Related Questions