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 domain name in java api

lshankar_mcalshankar_mca Members
edited April 2013 in Sahi - Open Source
Hi,

I am testing a web application. which is a domain based application.
After launching the Sahi Recorder I can view the domain name of any object by control mouse over.

Now I want to get the domain name of the page while executing the script form the java api.

how can i get the domain name of the web page.


Regards,
Shankar L

Answers

  • Hi,

    To get the page title use

    var $Title;
    _set($Title, document.title);

    To get the page url use

    var $url;
    _set($url, window.location.href);
Sign In or Register to comment.