How to restart firefox if page timeout?

I’m on windows server 2022. How do you make kantu restart firefox if page timeout?

Can you please post a test macro to clarify what you mean?

What I want to do is if a site fails to load I want it to close firefox and open it again and then restart the macro. I’m using verifyElementPresent command to check a element exists on the site since I don’t know any other way to check if a site fails to load.

Here is my test macro

{
“Name”: “forum”,
“CreationDate”: “2025-10-20”,
“Commands”: [
{
“Command”: “open”,
“Target”: “``https://www.akiba-online.com/threads/what-anime-are-you-currently-watching.2114223/page-2#post-4899999”``,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “3000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “verifyElementPresent”,
“Target”: “linkText=Edit”,
“Value”: “”,
“Targets”: [
“xpath=//*[@id="top"]/div[3]/div/div[2]/div/a/span”,
“xpath=//div[2]/div/a/span”,
“css=#top > div.p-body-header > div > div.uix_headerInner–opposite > div > a > span”
],
“Description”: “”
},
{
“Command”: “if”,
“Target”: “${!statusOK} == false”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=CLOSE”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “linkText=Edit”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}

How do I make it restart firefox & macro? selectWindow | TAB=CLOSE only closes the browser but I don’t know how to make restart firefox & macro

Refresh web page if element not there

Increase page load time