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 find a word from a string in sahi
I am fetching rows from database using _getDB function and there I need to verify a particular word from a column .
Ex: I need to verify the existence of the word " Sahi" from a db column named "xyz" which has the value : " Sahi Automation tool is very helpful".
I am using :
var dbcom = _getDB("DB Name ");
var $rscom10 = dbcom.select("SELECT * FROM COMM_DAT_MESSAGE_T O");
_assertExists("Sahi", $rscom10[0]["XYZ"]);
But this assertion is not working.
TypeError: orig is undefined
Can anyone please suggest how to rectify this problem??
Regards
Soumi
Ex: I need to verify the existence of the word " Sahi" from a db column named "xyz" which has the value : " Sahi Automation tool is very helpful".
I am using :
var dbcom = _getDB("DB Name ");
var $rscom10 = dbcom.select("SELECT * FROM COMM_DAT_MESSAGE_T O");
_assertExists("Sahi", $rscom10[0]["XYZ"]);
But this assertion is not working.
TypeError: orig is undefined
Can anyone please suggest how to rectify this problem??
Regards
Soumi
Answers
Apart from what globalworming mentioned, you can use this alternative as well.
_assertContainsText("Sahi", $rscom10[0]["XYZ"]);
Regards,
Pratyush