[Issue #578] Kantu V5 gotoIf_v1 window.location.href not extracting webpage values anymore

after kantu V5 update on Chrome i expected gotoIf_v1 would work just like before (because documentation says it works like StoreEval), however when i evaluate window.location.href or document.title the values are extracted from the extension window (href returns extension path to popup.html) instead of from the webpage.
it this a bug or?

e.g. when i run the following macro,
StoreEval href includes google = true,
executeScript_Sandbox href includes popup.html = true,
and the gotoIf_v1 lines used to land on label “—>includes google” but after V5 now it lands on label “—>includes popup.html”.

{
  "Name": "000_test_000",
  "CreationDate": "2019-6-5",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://www.google.com/",
      "Value": ""
    },
    {
      "Command": "storeEval",
      "Target": "(window.location.href).includes(\"google\")",
      "Value": "storeEval_result"
    },
    {
      "Command": "echo",
      "Target": "storeEval_result includes google= ${storeEval_result}",
      "Value": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return (window.location.href).includes(\"popup.html\")",
      "Value": "executeScript_Sandbox_result"
    },
    {
      "Command": "echo",
      "Target": "executeScript_Sandbox_result includes popup.html= ${executeScript_Sandbox_result}",
      "Value": ""
    },
    {
      "Command": "gotoIf",
      "Target": "(window.location.href).includes(\"google\")",
      "Value": "--->includes google"
    },
    {
      "Command": "gotoIf",
      "Target": "(window.location.href).includes(\"popup.html\")",
      "Value": "--->includes popup.html"
    },
    {
      "Command": "label",
      "Target": "--->includes google",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "--->includes google",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "label",
      "Target": "--->includes popup.html",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "--->includes popup.html",
      "Value": ""
    }
  ]
}

thanks

1 Like

Thanks for the good test case. Issue confirmed.

Issue solved with V5.0.3

1 Like

wonderful! thank you very much