How to handle randomly popup?

When my test case is in progress, the phone will randomly receive notifications, and the loading icon will pop up on the screen (may be less than or equal to 1 second), and then the entire test will fail, and the next test case fails to proceed.

Is there a function that can keep reading the screen, if a loading icon appears, it will paused until it disappears, and then continue to execute the test case?

Not sure if this will help but in Manual mode under Input column you can double click the 0 and change the timeout in seconds for each line. e.g. if you have a verifyElementVisible command for an object, adjusting this input from 0 to 10 will make Katalon wait for 10 seconds to verify the element before proceeding.

thx, I tried it, not really can fixed the problem.

Does the scenario necessarily involve random appearances of the icon ? If within a test case an icon is ensured to appear, then you can try to use WaitForElementPresent to wait for the icon to appear, and then WaitForElementNotPresent to wait for the icon to disappear.

1 Like

Hi, I wonder whether ‘desired capabilities’ might resolve this? The Katalon docs go over the syntax but don’t seem to cover this exact case but Appium docs mention auto dismissing alerts and dialogs - see here:

1 Like

thanks, will take a look at it

The loading icon will suddenly appear between any test case. If use WaitForElementPresent and WaitForElementNotPresent, I must write in every line

My current solution is to set each FailureHandling to OPTIONAL, and then write an if stament in the next line of each line execution to check whether the execution of the previous line is done, if not, repeat the previous action