You can try add some code below( marked by **************)
Dim intCurRow
***********************************************************************************************************************
intCurRow=DataTable.GetSheet("'Global").GetCurrentRow
************************************************************************
If actualDD = expectedDD Then
' MsgBox
Pass ' For
Debugging
Reporter.ReportEvent micPass, " Expected Result:
"& actualDD
&" = Actual Result:"& expectedDD &"", "Test Passed"
ElseIf actualDD <> expectedDD Then
'MsgBox Fail ' For
Debugging
Reporter.ReportEvent micFail , " Expected Result: "&
actualDD &"
<> Actual Result:"& expectedDD &"", "Test Failed - Please Check the
Difference"
End If
DataTable.GetSheet("'Global").SetCurrentRow intCurRow+1
************************************************
On Jun 22, 1:13 pm, johnthenu <[email protected]> wrote:
> Hi,
>
> I have several actions and from each of the action i am calling some
> validation function...
>
> Call compareExpectedAndActual (expFirstDD, actFirstDD)
>
> For validation the values are pulled from local sheet and for the
> actions the value are pulled from global sheet.
>
> Now the problem is when the validation passes,,,,everything is
> normal ....but when the validation fails.....QTP can not pick up the
> value from the global sheet for the next action....
>
> I am confused on why this is happening
> Here is my validation code:
>
> Public Sub compareExpectedAndActual (actualDD, expectedDD)
>
> If actualDD = expectedDD Then
> ' MsgBox Pass
> ' For
> Debugging
> Reporter.ReportEvent micPass, " Expected Result: "&
> actualDD
> &" = Actual Result:"& expectedDD &"", "Test Passed"
> ElseIf actualDD <> expectedDD Then
>
> 'MsgBox Fail
> ' For
> Debugging
> Reporter.ReportEvent micFail , " Expected Result: "&
> actualDD &"
> <> Actual Result:"& expectedDD &"", "Test Failed - Please Check the
> Difference"
> End If
>
> End Sub
>
> Many Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---