I am creating an automation framework using silk.
As part of my work, I have to create an excel sheet with following dara
TestcaseNO TCName ExecuteOrNot Result
TC0001 LogonScreen Yes
I have read the data from this excel sheet thru silk script, and i have to execute corresponding testscript if the ExecuteOrNot is Yes.
Please anyone give an idea to to read individual cells in excel thru silk and also how to update a particular cell...
NOTE: I have gone thru few posting on reading excel, but i didnt get clear idea on this.
You can Do:
testcase DD_Test1 (REC_DATALIST_DD_Test1 rData) appstate none
Fetch the entries in Column ExecuteOrNot to a variable (say todo)& use
IF(todo == Yes)
(your test case)
print("ExcuateOrNot = No")
But my requirement is....
I am having 100 rows in my excel sheet. I have to check each and wvery row, and execute corresponding testscript if YES
Please give me some idea.....how to get individual cell values.
In Test Partner, we have command like "cell(row,col)" to get indivudual cell values
Instead of doing too much of programing; can u sort of all the rows in excel where ExcuateOrNot = YES; & create a new table, from which you run the require test case
What you need to do is:
1.Connect to the DB (use DB_Connect)
2. Formulate the exact SQL query to retrieve the data that you want and then use DB_ExecuteSql. Then use DB_FetchNext to loop through all the rows of data/ list of data.(I think I remember using Help and Knowledge Base for doing something similar a long time back.)
if the while loop of whatever kind of looping mechanism you use to loop through the data, add a call to whatever testcase you want executed.