Get current url of a webpage instead the current url of ui.vision

Hello,

I tried to use this solution to get the current url page, but it get the ui.vision popup url instead of the current url webpage tested ! How can I do to get the url webpage and not the ui.vision url please ?

{
“Command”: “executeScript_Sandbox”,
“Target”: “var currentPage = window.location.href; return currentPage;”,
“Value”: “currentPage”
},
{
“Command”: “echo”,
“Target”: “${currentPage}”,
“Value”: “”
}

Thanks in advanced

I use this code and working

{
“Name”: “Save_Current_Url”,
“CreationDate”: “2020-9-23”,
“Commands”: [
{
“Command”: “executeScript”,
“Target”: “return (window.location.href)”,
“Value”: “executeScript_Sandbox_result”
},
{
“Command”: “echo”,
“Target”: “${executeScript_Sandbox_result}”,
“Value”: “”
}
]
}

1 Like