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.

hot to get text of the link

beesmanbeesman Members
edited November -1 in Sahi - Open Source
_debug(_link(0,_in(_row("list_line_odd")), _under(_cell("Name"))).outerHTML);
_debug(_link(0,_in(_row("list_line_odd")), _under(_cell("Name"))).innerHTML);

debug:
<A onclick="javascript:showDetail('A100726003','/Kiss.do');return false;" href="#">Kate</A>
debug:
Kate

$name = _link(0,_in(_row("list_line_odd")), _under(_cell("Name"))).innerHTML ;
$sql = "select * from information where name ='" + name + "'"
_debug($sql);

debug:
select * from information where name ='_link(0,_in(_row("list_line_odd")), _under(_cell("Name"))).innerHTML'

how to get the text like : select * from information where name ='Kate'

Comments

  • narayannarayan Administrators
    Hi Beesman,

    Change

    $name = _link(0,_in(_row("list_line_odd")), _under(_cell("Name"))).innerHTML ;

    to

    var $name;
    _set($name, _getText(_link(0,_in(_row("list_line_odd")), _under(_cell("Name")))));

    Regards,
    Narayan
  • Hi narayan

    It works fine! Thanks!!!
This discussion has been closed.