18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
accessing the window object
Hi,
at the end of my testscript i'd like to get the current url for further processing. I spent some hours trying to get this to work
Finally i tried
Maybe someone can enlighten me what's the difference?
Greetings from Munich,
Gerhard
at the end of my testscript i'd like to get the current url for further processing. I spent some hours trying to get this to work
var $endURL = window.document.location.href;
which gives me a "window not defined".Finally i tried
_set($endURL, window.document.location.href);
and this works fine.Maybe someone can enlighten me what's the difference?
Greetings from Munich,
Gerhard
Comments
window.document.location.href is an attribute present on the browser; not on the proxy. To get any variable value from the browser on to the script runner in the proxy, we need to use _set. Hope that helps.
Regards,
Narayan
Gerhard