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.
Sahi Proxy and DB calls...
Can anyone tell me a way to control Sahi....yes control it. I have two lines in one of my scripts that call a database query yet when the proxy is start and the page is set through the controller it calls the db queries. This is strange to me it hasn't hit the line of code that calls this method so why is the proxy calling it. Plus besides that when it does get to the line that calls the database query it does it 5 or 6 times.
Here is some output on what the SahiProxy is doing: (user name and password removed for obvious reason)
At the very end of this output you will see it search for BVTUser again and that user is not longer in the database as it has been modified to EditedBVTUser!
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
### Creating New Socket : 13444
### Creating New Socket : 13445
### Creating New Socket : 13446
### Creating New Socket : 13447
### Creating New Socket : 13448
### Creating New Socket : 13449
### Creating New Socket : 13450
### Creating New Socket : 13451
### Creating New Socket : 13452
### Creating New Socket : 13453
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: ********
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
### Creating New Socket : 13454
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'EditedBVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
### Creating New Socket : 13455
### Creating New Socket : 13456
### Creating New Socket : 13457
### Creating New Socket : 13458
### Creating New Socket : 13459
### Creating New Socket : 13460
Here is some output on what the SahiProxy is doing: (user name and password removed for obvious reason)
At the very end of this output you will see it search for BVTUser again and that user is not longer in the database as it has been modified to EditedBVTUser!
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
### Creating New Socket : 13444
### Creating New Socket : 13445
### Creating New Socket : 13446
### Creating New Socket : 13447
### Creating New Socket : 13448
### Creating New Socket : 13449
### Creating New Socket : 13450
### Creating New Socket : 13451
### Creating New Socket : 13452
### Creating New Socket : 13453
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: ********
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
### Creating New Socket : 13454
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'EditedBVTUser'
Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@10.^^^.^^^.18:&&&&:orcl
Username: *******
Password: *******
SQL: SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS
WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME = 'BVTUser'
### Creating New Socket : 13455
### Creating New Socket : 13456
### Creating New Socket : 13457
### Creating New Socket : 13458
### Creating New Socket : 13459
### Creating New Socket : 13460
Comments
So are you saying that your DB routine is in a function?
{
var db = _getDB($DBDriver,$DBConnect,$oracleUserValue, $oraclePasswordValue);
var $subscriberSetDB = [];
$subscriberSetDB = db.select("SELECT SUBSCRIBER_SET_NAME, SUBSCRIBER_SET_DESCRIPTION FROM SUBSCRIBER_SETS WHERE DELETION_USER IS NULL and SUBSCRIBER_SET_NAME =
'"+$subscriberSetName+"'");
return $subscriberSetDB;
}
i was thinking about wrapping the _call() method around it but I am not sure if that will swallow my return values!
Added _call() around my function calls and it didn't change the out come of the proxy redoing the original query when it shouldn't!
I've found that functions are evaluated and called if they are defined but never called later in the script e.g.
function something () {
*do something*;
};
*do something* happens when the script is loaded because something(); is never called.
Thanks I will post back if it fixes the issue or if it doesn't!
Before people get up in arms about me posting about another tool here I am just doing it as a complimentary tool I don't use one over the other just were one falls short I use the other and go back and forth!
AutoIT and Sahi complement each other well and make for great hybrid systems.