06-03-2010, 10:53 AM
(This post was last modified: 06-03-2010, 11:00 AM by chanda Hemke.)
it would be good if u can provide me some sample code.recovery sceanio is for Pop up window....
here is my code...the frist one is my normal function..from where my recovery sceanio is triggered...during run when my script try to exceute "With SwfWindow("Main Frame: FA Terminal")" statement of first fucniton...it triggers the Recvoery scenario function (the second one) Function Recovery_MarginShortForClient(Object).
I want to pass dbConnectionOIObject, dbConnectionObject, testScenario_SequenceNumber, TestFailedScenariosSnapshotLocation to Recovery Function.....
here is my code...the frist one is my normal function..from where my recovery sceanio is triggered...during run when my script try to exceute "With SwfWindow("Main Frame: FA Terminal")" statement of first fucniton...it triggers the Recvoery scenario function (the second one) Function Recovery_MarginShortForClient(Object).
I want to pass dbConnectionOIObject, dbConnectionObject, testScenario_SequenceNumber, TestFailedScenariosSnapshotLocation to Recovery Function.....
Code:
Public Function OpenOrderEntrySell(dbConnectionOIObject, dbConnectionObject, testScenario_SequenceNumber, TestFailedScenariosSnapshotLocation)
On Error Resume Next
With SwfWindow("Main Frame: FA Terminal")
.SwfToolbar("Menu_main Frame").WaitProperty "enabled", true, 1000
.SwfToolbar("Menu_main Frame").Type MicF2
With .SwfWindow("Win_FA Order Entry")
.WaitProperty "Visible",True,10000
If .Exist(5) Then
OpenOrderEntrySell="Passed"
Else
Dim Path_Failed_Snapshot Path_Failed_Snapshot=TestFailedScenariosSnapshotLocation & testScenario_SequenceNumber&".png"
SwfWindow("Main Frame: FA Terminal").CaptureBitmap Path_Failed_Snapshot,True
Dim ReporterStatement
ReporterStatement="Rerun - Can not open Sell Order form"
Call UpdateActualExpectedValue(dbConnectionObject, testScenario_SequenceNumber, ReporterStatement)
OpenOrderEntrySell="Failed"
End If
End With
End With
End Function
Function Recovery_MarginShortForClient(Object)
If StrComp(uCase(Arr(0)),uCase("Order rejected. Exposure not available. Margin short ")) =0 Then
SwfWindow("Main Frame: FA Terminal").Dialog("Dialog_MarginShortMessage").Winbutton("OK").Click
End If
End If
End Function