Test Case
In My web page, I have 5 tabs (A,B,C,D,E) in which 2 tabs (A,B) are clickable and 3 Tabs(C,D,E) are not clickable.
Write a script to verify those tab elements are clickable or not.
What I've tried
1) expect(element(by.id(ID_of_UnCLICKABLE_menu)).isEnabled()).toBe(True); expect(element(by.id(ID_of_CLICKABLE_menu)).isEnabled()).toBe(True);
Test passed for both unclickable and clickable elements.
**ExpectedResult** -> Need to fail for either of one.
and:
2) var EC = protractor.ExpectedConditions;
browser.driver.wait(EC.elementToBeClickable(element(by.id())), 5000, 'Not Clickable');
HTML code:
<tr>
<td id="id1234" class="name_style-button disabled" role='menuitem'>Text</td>
</tr>
Note: This is a non-Angular page.
TorF
in your first try? How does it fail in your first try? Thanks. – alecxe♦ Aug 31 '17 at 14:42html
appears to show them as enabled even though your application, and the way they are displayed, has them disabled, so you can't check it through selenium through those conditions. – mrfreester Sep 1 '17 at 16:52