2

I'm having a problem but I'm not sure what is the cause.

When I run a test case that includes an iframe object, on the first run Katalon is finding the iframe but unable to click an object inside of the frame. After leaving everything as is (I'm not changing anything in the script) and just re-running the test, the object in question is found and the test passes. There are no dynamic locators or anything similar involved.

I looked at the Automated test flakiness but I didn't recognize a solution to my problem. Did anyone face a similar issue?

Alternatively, is there a way to run the same test twice, under condition that the first one fails?

  • do you have any alert message in the scenario – Vel Guru Mar 30 '18 at 4:13
  • It is usually the "element not clickable" message, e.g.: Root cause: org.openqa.selenium.WebDriverException: unknown error: Element <button .....>...</button> is not clickable at point (1878, 902). Other element would receive the click: <div class="ui-widget-overlay ui-front"></div> – Mate Mrše Mar 30 '18 at 6:45
  • Which browser and its version you are using? – Vinh Nguyen Apr 2 '18 at 4:07
  • It's Chrome Version 63.0.3239.132. – Mate Mrše Apr 3 '18 at 6:44
1

You have to use:

Wait For Element Not Visible

For this element <div class="ui-widget-overlay ui-front"></div>

It appears on the front-end most probably when there is some back end operation running and disappears when the operation is finished.

You maybe have to add some delay of 1 or 2 seconds before the above step if the test persist to fail from time to time.

  • This will take out some of the test flakiness. – Mate Mrše Apr 16 '18 at 8:36
  • I used Wait For Element Not Present for element selected by css selector '.ui-widget-overlay'. Wait For Element Not Visible throws a stale element exception. My app has the overlay used for every dialog box, form or iframe opened. So this seems to reduce flakiness by a good amount. knocks on wood – Mate Mrše Apr 25 '18 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.