03-09-2015, 11:19 AM
Hi ,
I am trying to parameterize the actions and below is the code which I had designed
and the test data sheet is
Scriptname OracleDatabase SQLdatabase Access
Action1 [GUITest1] Yes Yes
Action1 [GUITest2] YEs Yes
The problem here is, when I was running the above code , for the first iteration "Action1 [GUITest1]" is being executed and it is correct.
In the second iteration, for oracle database,"Action1 [GUITest2]" script executed and for SQL database again "Action1 [GUITest1]" got executed. As per my understanding it should execute "Action1 [GUITest2]" action only as I used the setcurrentrow method of datatable.
I little confused here why it is executing the "Action1" for SQL database instead of "Action2" in the second iteration?
Please make me clear on this.
Thanks,
I am trying to parameterize the actions and below is the code which I had designed
Code:
Datatable.ImportSheet "Q:\Excel.xls","Sheet1","Action1"
a=datatable.GetSheet("Action1").GetRowCount
For i= 1 to a
Datatable.GetSheet("Action1").SetCurrentRow(i)
If datatable.Value("OracleDatabase","Action1")<>"" Then
RunAction Datatable.Value("Scriptname","Action1"), oneIteration,"Oracle"
msgbox Datatable.Value("Scriptname","Action1")
End If
If datatable.Value("SQLdatabase","Action1")<>"" Then
RunAction Datatable.Value("Scriptname","Action1"), oneIteration
msgbox Datatable.Value("Scriptname","Action1")
End If
RunAction "Action1 [MediumSanityWF12]", oneIteration
Next
and the test data sheet is
Scriptname OracleDatabase SQLdatabase Access
Action1 [GUITest1] Yes Yes
Action1 [GUITest2] YEs Yes
The problem here is, when I was running the above code , for the first iteration "Action1 [GUITest1]" is being executed and it is correct.
In the second iteration, for oracle database,"Action1 [GUITest2]" script executed and for SQL database again "Action1 [GUITest1]" got executed. As per my understanding it should execute "Action1 [GUITest2]" action only as I used the setcurrentrow method of datatable.
I little confused here why it is executing the "Action1" for SQL database instead of "Action2" in the second iteration?
Please make me clear on this.
Thanks,