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.

to get the h1 text

lawrencelawrence Members
edited November -1 in Sahi - Open Source
I have the below html code:

<td align="center" valign="top" bgcolor="#FFFFFF" scope="col">
<div id="cnt">
<h1>
Setup</h1>
<br />
<p>
 </p>

I need to get the text "Setup". Any idea?

Comments

  • Hi lawrence,

    You can use this:

    var $text = _getText(_heading1("Setup"));
    _alert($text);

    Regards
    Sumitra
  • narayannarayan Administrators
    var $text = _getText(_heading1(0, _in(_div("cnt"))));
    _alert($text);
  • Hi Narayan,

    Thanks and it works for me.
This discussion has been closed.