storeAttribute a link with relative path is impossible?

Hi, I tried to a code below:

{
  "Name": "Vinlac - Get Link",
  "CreationDate": "2021-5-24",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://www.facebook.com/vinlacnt",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "storeAttribute",
      "Target": "xpath=//*[contains(@id,\"jsc_c_\")]/span[2]/span/a@href",
      "Value": "mylink",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "The link is ${mylink}",
      "Value": "red",
      "Description": ""
    },
    {
      "Command": "open",
      "Target": "${mylink}",
      "Value": "",
      "Description": ""
    }
  ]
}

But it doesn’t working for me. The echo result:

 [echo] The link is #

Is the problem because the relative path? But I can’t use absolute path because the id dynamic every time the page reload.

The example page:

Sữa Vinlac Nha Trang

Please try to get the link of the first post. Please check the screenshot below, it will help explain my situation better.

Screenshot

Do you want to click the link or extract the URL?

If just click => use XClick, especially on facebook.

1 Like

Hi Plankton, if it’s possible, I will use Xclick, but the link in here is the date-time link, so the text change every hours and it not a solution for me.

I’ve explained more about it in other ticket: Click a link with selector change everytime.

I’ve tried to click the link but it’s impossible, so I want to trying extract it and open it later, not sure if it’s possible or not.

so the text change every hours and it not a solution for me.

How about using xclickrelative then? You could use e. g. the world icon as anchor:

1 Like

I think facebook use dynamic id, in this case you must use alternative paths (axes or relative paths)

1 Like

Seems it’s working fine for me at the moment with the XclickRelative, thank you so much for your support.