18 January 2026:


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.

how to get the url of the current page

manasa.msmanasa.ms Members
edited November -1 in Sahi - Open Source
Hi,
I want to verify, that a web page is opened or not upon clicking some link, for that i need to get the url of the current page, is there any api available, to get the url or any other way to verify a web page.

Comments

  • use this code to get the url of a particular page

    var $url;
    _set($url, window.location.href);

    the url of the page will be stored in the variable $url
  • SumitraSumitra Members
    Hi manasa.ms,

    You can use:

    var $x;
    _set($x, window.document.location.href);

    Regards
    Sumitra
  • Its working ,
    _set($url, window.location.href);
    _set($x, window.document.location.href);
    both are working...
    Thank you Sumitra and vijaysaims :)
This discussion has been closed.