Forum Discussion

mrouse's avatar
mrouse
Contributor
12 years ago

Modal window behind the Application window

Hello,



I hope some one has dealt with this issue in the past. 



In recording my test, at one point a modal window displays and wants the OK button clicked which TestComplete then clicks.



However sometimes (intermittently) during playback the modal window comes up but is behind the main application window and the test fails because it can't click "OK" on the modal window.



I have read some on setting the overlapping window configuration button , but in the explanation of the overlapping window configuration it said there was no guarantee that the button click won"t activate something on the overlapping window instead.



Do you have any suggestions I can try?



Thanks,



Mike

3 Replies

  • spatel_1's avatar
    spatel_1
    Occasional Contributor
    Does your button have other click methods?  Like PerformClick, RaiseClick, OnClick, etc?  These methods don't rely on the button being visible (or enabled so you have to check yourself)


  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)
    Hello Mike,

    Have you tried calling the Activate or SetFocus method of your problematic modal window before simulating clicks on its controls in your test? Does it help?

    Please note that you can also try calling the native click method of your modal window's OK button, just as Stephen suggests. Can you access the button's native methods and properties from your tests? What application are you testing?

    Thank you.
  • Julia and Stephen,



    Thank you so much for the help, I will give you suggestions a try when I get back form a long awaited vacation.



    I will definately up date you at hat time.



    Thanks,



    Mike