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.

How to store intermediate value for comparison later

ootoot Members
edited November -1 in Sahi - Open Source
I have a situation where in i have to store an intermediate results in variables
for comparison later.
Eg: I have a situation where in i have to compare two values ,
1 value from the database and another is a value obtained from the script .
how can i store the retrived value from database and also compare it with the
value obtained from script.
I retrive the value using :
var db = _getDB("DRIVEDETAILS, DABADDRESS", "LOGIN", "PASSWORD");
_wait(6000);
var $rs = [];
_set($rs, db.select("select EVENT_CODE from BILLING_EVENTS where EVENT_ID = (select max(EVENT_ID) from BILLING_EVENTS)"));
_assertEqual("ccc", $rs[0]["EVENT_CODE"]);
_alert("Database Script run Successfully");

I need to compare the value of "EVENT_CODE" from DB with that of present value of the script.
How can i do it? Please help me out.

Comments

  • pankaj.nithpankaj.nith Members
    edited November 2008
    var $x;
    _set($x, $rs[0]["EVENT_CODE"]));
    you can use this $x to compare the current value in _condition().
Sign In or Register to comment.