Open link in new tab

Also, I found that the store attribute solution as suggested by @erdomay7 works as well, once you find the right xpath.

In our case we need the one with the /a at the end. It contains the href attribute:

image

So this works:

  1. extract URL with “store attribute @href
  2. Split string to get ID
  3. Combine the “View.aspx” base URL with ID
  4. Open new tab with selectWindow | Tab=Open

See here:

Macro:

{
  "Name": "storeattribute",
  "CreationDate": "2021-10-5",
  "Commands": [
    {
      "Command": "storeAttribute",
      "Target": "xpath=//tr[4]/td[4]/a@href",
      "Value": "a",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "${a}",
      "Value": "blue",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return ${a}.split(\"=\")[1].trim();",
      "Value": "b",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "${b}",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "selectWindow",
      "Target": "TAB=OPEN",
      "Value": "https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=${b}",
      "Description": ""
    }
  ]
}