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.
how to get the text
Hi,
I want to get text from the following HTML element:
<div class="yregertxt"><strong><strong>Invalid ID or password. </strong><br/>Please try again using your full Yahoo! ID, and type the text you see in the picture below.</strong></div>
I want to get the following text "Invalid ID or password. Please try again using your full Yahoo! ID."
After this I want to assign it to a variable.
Please help!
I want to get text from the following HTML element:
<div class="yregertxt"><strong><strong>Invalid ID or password. </strong><br/>Please try again using your full Yahoo! ID, and type the text you see in the picture below.</strong></div>
I want to get the following text "Invalid ID or password. Please try again using your full Yahoo! ID."
After this I want to assign it to a variable.
Please help!
Comments
thanks,
santosh
var $msg;
_set($msg, _getText(_byClassName("yregertxt", "DIV")));
_alert($msg)
I am new so will bother u a lot
santosh
<body id="about">
<div class="header">
<img src="/Company/images/login/logo.png" height="50">
</div>
<div class="wrapper" style="min-width:350px !important; max-width:350px !important">
<h1>My Company</h1>
<h2>
<div>
<span>Version:</span><strong>10.4.0.0</strong>
</div>
<div>
<span>Timestamp:</span><strong>2/12/2013 10:45 AM</strong>
</div>
</h2>
</div>
</body>
My code:
_set($version,_getText(_byClassName("wrapper","strong")));
Error:
_sahi.setServerVar('\$version', _getText(_byClassName("wrapper","strong"))); Error: The parameter passed to _getText was not found on the browser
I'm calling this from within a custom function, IE.
everytime i get this error message:
Error: The parameter passed to _getText was not found on the browser
im using chrome btw