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.
text exists?
Hi,
the code is:
i try to know if the text : "Text and more text" exists in the html, if exists the script will do some action. (for example an user login)
any ideas to help me with use an if condition, like :
if (_exists(this text) == true)
{
user login
}
else
{ i will write on the log "the user not login" }
Thanks a lot !
from Argentina.
the code is:
<div class="block block-user region-count-1 ">
<div class="block-inner clearfix">
<h2 class="title">
<span class="first-word">Text</span>
and more text
</h2>
i try to know if the text : "Text and more text" exists in the html, if exists the script will do some action. (for example an user login)
any ideas to help me with use an if condition, like :
if (_exists(this text) == true)
{
user login
}
else
{ i will write on the log "the user not login" }
Thanks a lot !
from Argentina.
This discussion has been closed.
Comments
You can use the _containsText(el, txt) API.
Check if this solves your problem.
Regards,
dkulkarni
the final code:
Thanks dkulkarni !