Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. QA Testing
  3. Question
QA Testing

How can I verify that these menu items clicktab('tab_detail',false);srchlog('listing number','click',true); are clickable or not?

Asked by Andrea Bailey May 10, 2022 573 views 1 answer
Share

About this question

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 clickable and clickable elements. 
 **ExpectedResult** -> Need to fail for either one.
and:
2) var EC = protractor.ExpectedConditions;
   browser.driver.wait(EC.elementToBeClickable(element(by.id())), 5000, 'Not Clickable');
HTML code:

    Text
 
Note: This is a non-Angular page.

Your answer

1 Answer

More QA Testing discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest QA Testing Blogs

Guides, tips and career advice on QA Testing from JanBask experts.