Excerpt 9-handling of unexpected windows
Http://www.china-pub.com/196509
During the automated test project process, we will inevitably encounter some unexpected windows which are not processed in the scripts we have written, such as some exception windows. Different test tools have different processing mechanisms for unexpected windows. For example, qtp adopts the recovery senario mechanism, while testcomplete can adopt two methods.
Default handling method of unexpected window
In testcomplete, you can set the properties of the default project to determine the default Processing Method of the unexpected window by selecting the menu "Tools | default Project Properties ", select playback on the page shown in 12.1, and select the default Processing Method of the unexpected window in "on unexpected window.
The following solutions are available:
Q ignore unexpected window: Ignore unexpected window.
Q stop execution: stops script execution.
Q click on focused control: Click the control where the current focus is located.
Q Press ESC: Press ESC.
Q press Enter: Press enter.
Q send wm_close: Send the wm_close message.
Unanticipated window Customization
We can first compile some processing window functions, such as processing the window popped up on the login interface and handling program exception window.
...
Excerpt 9-handling of unexpected windows
Http://www.china-pub.com/196509