Forum Discussion
Hi,
You can try the making use of the sample code provided in the smartbear forum. Below is the sample vbscript coded taken from the forum
Sub Test
Dim p, w, ResObject
...
' Calls the method that displays a modal dialog
Set ResObject = Runner.CallObjectMethodAsync(p.VCLObject("MainForm")._
VCLObject("ADialog"), "Execute")
' Simulates user actions over the dialog and closes it
Set w = p.WaitWindow("*", " ADialogCaption ", -1, 1000)
If w.Exists Then
w.Window("Button", "*Ok*").ClickButton()
Else
Log.Message("The window was not found.")
End If
' Waits for the method completion
ResObject.WaitForCompletion(5000)
' Processes the result
If ResObject.Completed Then
Log.Message("Success, Return Value: " + CStr(ResObject.ReturnValue))
Else
Log.Message("Failure, Return Value: " + CStr(ResObject.ReturnValue))
End If
...
End Sub
Thnks a lot for reply. it worked for me very well.
It is working for Click actions perfectly not pausing the playback. But we have some actions like Object.Checked =True.
How can we mention Checked Action in Runner.CallObjectMethodAsync method?
Thanks,
Swapna
- HKosova8 years agoSmartBear Alumni (Retired)
swapna-erram wrote:But we have some actions like Object.Checked =True. How can we mention Checked Action in Runner.CallObjectMethodAsync method?
Properties typically do not need async assignment. But if needed you can use Runner.SetObjectPropertyAsync().
- swapna-erram8 years agoOccasional Contributor
Thanks Helen .. It worked for me
-Swapna
- swapna-erram8 years agoOccasional Contributor
Hi,
We have Tree Grids in our application and inside Tree grid we have one more grid. We are able to enter values in the cells of the Grid but unable to save the values, when we try to enter the values into other cells the value entered previously is reset to previous value.
Here is the snippet we used :
Aliases.DevWin.frmTimeScale.fmeTimeScale.fmeTimescaleStages.grdStages.TcxGridSite.Container.CurrentView.GridRecords(0).SetValue 3,"100"
Log.Message Aliases.DevWin.frmTimeScale.fmeTimeScale.fmeTimescaleStages.grdStages.TcxGridSite.Container.CurrentView.GridRecords(0).DisplayTexts(3)
Attached Screenshots of grid and properties:
Thanks,
Swapna
- tristaanogre8 years agoEsteemed Contributor
Checked is not an action, it's a property that you are setting to the value of "true". For that control, you should look to see if there is a "SetChecked" or "ClickChecked" method to be able to set the value.
Related Content
- 10 years ago
Recent Discussions
- 13 hours ago
- 7 days ago
- 10 days ago