Forum Discussion
Thanks for the info.
For some of the custom controls iam using native properties and able to interact with.
My application is Delphi application and built using compiled with debug information.
Now iam facing different issue. We have some model popups displayed when we click on some controls. When the popup displayed my VBScript code looks like struck up and when i close the popup my code is returning to next statement. Is there any specific way to handle model popups.
Could you please help on this?
- tristaanogre8 years agoEsteemed Contributor
Generally speaking, read the following help topic:
https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/modal-windows.html
More specifically, if you know that such windows are coming up and expected, you can trigger them asynchronously using the method described here
- sanjay02888 years agoFrequent Contributor
Ah, I missed out checking tristaanogre reply. The link provided by tristaanogre should solve your problem :)
- sanjay02888 years agoFrequent Contributor
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- swapna-erram8 years agoOccasional Contributor
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().
Related Content
- 3 years ago
- 10 years ago
Recent Discussions
- 14 hours ago
- 7 days ago
- 10 days ago