Testcase was not working as expected

Hi @Narkokorzu , @linhntk

While performing automation Testing in iOS, Test case steps was getting passed before the given wait time for the keyword “Wait for the Element to Visible”.

The exact issue is, i have given wait time of “980 seconds” for the element which will be visble after downloading the package, but in akaAT the steps are automatically getting passed without waiting for the element and Report will be displayed as “Fail”

Am attaching the screenshot for your reference.

Please suggest the steps to fix this issue.

Hi Vineeth,
As I can see in your screenshot, you had a timeout of 980 seconds (step 2.27) and next step was Pass (step 2.28). So the issue here is in steps 2.29 and 2.30, right? Could you show more detail about it, error messages or something like that?

Sometimes a web element is visible but not immediately ready to be clickable. You can try adding a wait step (wait for 1 second or 2 seconds) between steps 2.29 and 2.30, using the keyword “Wait” in “Core Keywords”.

Hi @huyenhoang .

As per the screenshot i shared, The exact issue is in the Testcase step 2.27 , it is not waiting for element which will be visible after “980” seconds.
it was executed with in 6 seconds and moving for next step…

Expected result : It should wait for “980” seconds, and then it should perform click operation.

Actual result : Passing the test case step without completing the given wait time.

Actually, It has been fail at step “wait”
If you can see, you set 10s for wating, but it took “11.6s” for it/. It means there is not element like that display
Note:; Step wait always pass
=> check your object again

Hi @Vineeth
If you want to wait for a fixed amount of time, you should use the keyword “Wait” , not “Wait For Element Visible”

  • Keyword “Wait”: wait for certain amount of time = input timeout (here it’s 980s) → this step is finished after 980s
  • Keyword “Wait For Element Visible”: wait until the element is in visible state in amount of time and maximum time is input timeout (980s). → this step is finished whenever the element visible on your page.

Please double check and make sure that your element is correct and unique.

Hi @huyenhoang
The keyword " Wait" you suggested is “core keyword” , will it supports iOS mobile automation?

Could you please suggest.

Yes, core keywords are applied for all platforms

1 Like

Yes, it’s a generic keyword and you can apply it to your case @Vineeth