How to handle errors when loading website?

Hello everybody,
I got a question concerning a way to handle errors that can appear in a web site.

Sometime open web show white page. (I want to wait 10 second)
If 10 second then show white page same —> I want to close and open new

Please guide me for handle errors this case.

Thank you.

Hi @fairymemay

Give the delay for 10 seconds after launches the webpage. Then you can use the Check app state activity and indicate the white page, In the Target doesn’t appear block insert the activities to relaunch the webpage. Don’t give any activity in the Target appear block.

Hope it helps!!

@mkankatala

I use check app state but I confuse about target does not appear.
How to set it? I want to run step open web (in arrow red) and check step again (loop check no more 2 round)

image

Okay @fairymemay

If your query is like, you are launching a webpage if sign in button appears then you will continue with your further flow, If white page appears you want to relaunch the webpage.

Above one is your scenario, then follow the below steps,
→ Use the Use application\browser activity to launch the webpage for the first time.
→ Inside Use application\browser activity insert the Retry scope activity.
→ Inside Retry scope activity there is two block one is action and another is Condition block.
→ In action block insert the Navigate browser activity and select the refresh in the dropdown, after that insert delay activity and give 10 seconds.
→ In Condition block insert the Element exist activity and indicate on Sign in button.
→ Go to properties of Retry scope activity and give 3 in Number of retries field and give 5 seconds in Time interval.
→ After retry scope activity insert the other activities to move the automation forward.

The above process will works like untill the Sign in button appears the page will retry to load for 3 times.

Hope you understand!!

1 Like

If you don’t always need to wait the exact 10 seconds I’d advise to utilize the timeout in “Check App State”. As with static delays you will in most cases end up waiting needlessly.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.