Exist timeout failing for programmatic description
I have some code that checks if one of two types of popup window appears after clicking a button.
The check checks for a dialog and then for a custom .Net dialog and if either of them is show, it produces an error.
The code looks as below:
If QTPObject.Dialog("object class:=#32770").Exist(2) = True Then
ErrorMessage = QTPObject.Dialog("object class:=#32770").Static("window id:=65535").GetROProperty("text")
ElseIf QTPObject.SwfWindow("swftypename:=Jpmc.BlackWidow. CompositeUI.Services.CabApplicationShell.MessageBo xForm").Exist(2) = True Then
Set MessageForm = QTPObject.SwfWindow("swftypename:=Jpmc.BlackWidow. CompositeUI.Services.CabApplicationShell.MessageBo xForm")
ErrorMessage = MessageForm.SwfEditor("swftypename:=DevExpress.Xtr aEditors.TextBoxMaskBox").GetROProperties("text")
Both of the Exist commands have a timeout of 2 seconds. The first Exist check on the Dialog waits 2 seconds then proceeds to the next line. However one the second Exist command on the custom .Net dialog, it waits for 30 seconds instead of 2 before proceeding to the next line.
How can I stop this happening? I want it to wait for 2 seconds for both objects.
Re: Exist timeout failing for programmatic description
I've tried that. If I do an exist on a Window or a JavaWindow with programmatic descriptions then the timeout works correctly, if it is a SwfWindow with a programmatic description, the timeout is ignored and it uses the default 30 seconds.
I'm actually checking that a popup window hasn't appeared so havingto wait an extra 24 seconds is annoying