I have the following page angular.jsper page. Displayed items angular.js Li. One of them is greyed, the other is included. When I use the method Selenium webdriver .isEnabled(), both greyed out and enabled objects return "enabled".
First question: how do I get .isEnabled()to work with this type of element? Q The second question is that the webdriver will not do this, and I need xpath, I think, I could use something like this:
$x("//li[@class ='ng-scope disabled' and @id='actionCUSTARD']")
$x("//li[@class ='ng-scope' and @id='actionRHUBARB']")
The first returns something only if the given identifier is disabled, the second - only if the given identifier is included, it can be built into the Java method to check that the element is enabled or disabled for the given identifier. Is there an easier way to do this?
</li>
<li id="actionRHUBARB" class="ng-scope" on="deriveInvokeType(action)" ng-switch="" ng-class="{'disabled': false}" ng-repeat="action in getActionList()">
<a class="ng-scope ng-binding" ng-click="doAction(action)" ng-switch-default="" href=""></a>
</li>
<li id="actionCUSTARD" class="ng-scope disabled" on="deriveInvokeType(action)" ng-switch="" ng-class="{'disabled': true}" ng-repeat="action in getActionList()">
<a class="ng-scope ng-binding" ng-click="doAction(action)" ng-switch-default="" href=""></a>
</li>
source
share