Hi,
I’m trying to store document.readyStatus in a variable in kantu , but it returns undefined…
{
“Command”: “executeScript_Sandbox”,
“Target”: “var x = document.readyState; console.log(x);”,
“Value”: “x”
},
x returns undefined
Hi,
I’m trying to store document.readyStatus in a variable in kantu , but it returns undefined…
{
“Command”: “executeScript_Sandbox”,
“Target”: “var x = document.readyState; console.log(x);”,
“Value”: “x”
},
x returns undefined
Two issues:
You miss the return: executeScript | var x = document.readyState; console.log(x); return x; | x
You need to use : “executeScript” instead of “executeScript_Sandbox”!!! Reason: The “_sandbox” version of executeScript has no access to the web page document. It is intended “only” for calculations etc that need no data from a website.
Thanks , this worked well