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.
DB Validation
Hi,
I want to do DB validation for values which i have inserted through UI.
I tried using the below query :
var $rs = db.select("select * from Table_Name");
_assertEqual("Value", $rs[0]["Column_Name"]);
Above query works fine if there is only one record avaiable in db thus $rs[0] works perfect.
But if there are multiple records then the row no of the expected record changes.
Hence i tried using the query with where clause so that only one record is retreive but it getting failed.
var $rs = db.select("select * from Table_Namewhere Column_Name = 'value' ");
But after using the above query script is not getting executed may be because any syntax error or some other issue.
Hence can uyou please let me know how to proceed for validating DB values for my required specific record
I want to do DB validation for values which i have inserted through UI.
I tried using the below query :
var $rs = db.select("select * from Table_Name");
_assertEqual("Value", $rs[0]["Column_Name"]);
Above query works fine if there is only one record avaiable in db thus $rs[0] works perfect.
But if there are multiple records then the row no of the expected record changes.
Hence i tried using the query with where clause so that only one record is retreive but it getting failed.
var $rs = db.select("select * from Table_Namewhere Column_Name = 'value' ");
But after using the above query script is not getting executed may be because any syntax error or some other issue.
Hence can uyou please let me know how to proceed for validating DB values for my required specific record