Closed vitaly87 closed 7 years ago
seeElement
with proper CSS/XPath selector should be enough. Attributes can be part of CSS selector so something like this will work:
I.seeElement('submit[disabled]');
Anyway, use interactive shell to figure out the best locator.
hi @DavertMik , nope I get expected number of elements on a page '0' not to equal '0' the element html is :
<button id="input_1" bo-submit="bo-submit" type="button" ng-disabled="loginForm.$invalid || loginForm.$pristine" ng-click="vm.login()" class="btn btn-primary btn-flat ng-binding" disabled="disabled">login
<!-- ngIf: vm.loginFailed -->
</button>
Rather:
I.seeElement('[bo-submit]:disabled')
or
I.seeElement('[bo-submit]:not(:disabled)')
@vitaly87 Did you solved your issue? Looks like you just need correct CSS/XPath selector
Xpath e.g. //button[@id=input_1 and @disabled="disabled"]
Close due inactivity
Works for me thank you!!
Does this work with the appium helper?
Hi. How can I check if a button is disable? I am trying to do something like
I.seeElement('[bo-submit]')->I.hasAttribute('disable');
but it isn't working.