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.
RFE : Sahi can provide function to get the page title
RFE : Sahi can provide function to get the page title
Right now I'm using the following code :
Right now I'm using the following code :
<browser>
function browser_getPageTitle()
{
var $result = document.getElementsByTagName('title')[0].innerHTML;
return $result;
}
</browser>
function getPageTitle()
{
var $title;
_set($title, _call(browser_getPageTitle()));
return $title;
}
Tagged:
Comments
You could just use
_set($title, document.title);
and if you want to assert,
_assertEqual("my title", document.title);
Btw, you do not need to use _call inside _set. Just _set($varName, browserFunction()) would work.
Cheers,
Narayan
However, I would think these are functions that users would expect the framework to provide.