[Issue #567] How do you check if website is reachable or not?

Is there a way to check whether a website is reachable or not.

If the website does not load, the OPEN command times out. You can catch this error and log it.

(That said, I noticed a bug in V5.01. OPEN fails if no website is loaded in the tab. We will fix this ASAP. => Fixed in V5.0.3)

Here is how it will work once the bug is fixed (it works now, but only until a not-loading website is reached).

{
  "Name": "checkwebsite",
  "CreationDate": "2019-6-4",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://ui.vision/",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!errorignore"
    },
    {
      "Command": "store",
      "Target": "10",
      "Value": "!timeout_pageload"
    },
    {
      "Command": "open",
      "Target": "https://xxxxxxxxforum.ui.vision/",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "false",
      "Value": "!errorignore"
    },
    {
      "Command": "store",
      "Target": "60",
      "Value": "!timeout_pageload"
    },
    {
      "Command": "if_v2",
      "Target": "${!statusOK} == false",
      "Value": ""
    },
    {
      "Command": "throwError",
      "Target": "Website did not load",
      "Value": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": ""
    }
  ]
}

Second option: If you have a list of URLs and want to check if they are available, you can create a macro that enters the URL in a test website e. g. Website Uptime Test: Check Website Status | Uptrends and then web-scrape the result.

I tried using your first method, but there seems to be a problem to !timeout_pageload. The timeout_pageload did not wait for the page to load then proceed to next command

Does this happen with any URL or just a specific website?

Specific websites. As I’m automating local links