TC 8.5
JScript
Web|Flash
В приложениее в некоторый произвольный момент может появиться диалог (пр-р. не найден ресурс). Есть ли возможность обнаружить и обработать подобное событие.
Слушатели событий OnUnexpectedWindow и OnOverlappingWindow при его появлении не сработали.
OnUnexpectedWindow - совсем
OnOverlappingWindow - Waiting until the overlapped window becomes visible сообщение во время выполнения скрипата. Слушатель не вызван.

Как поймать и обработать неожиданное окно flash.
Автор t.barabanov, 17 окт 2011 14:55
В теме одно сообщение
#1
Отправлено 17 октября 2011 - 14:55
#2
Отправлено 25 октября 2011 - 19:36
Remarks
Currently, TestComplete does not handle the following window types as unexpected:
JScript
источник
Currently, TestComplete does not handle the following window types as unexpected:
- Modal windows in Flex applications (for example, those created using the PopUpManager class).
- ActionScript errors displayed by Flash Player.
- Unexpected windows in Delphi and C++Builder CLX applications. This is due to specifics of the CLX library implementation: an application’s window can be activated even when a modal dialog is displayed. Because of this behavior, TestComplete does not treat modal CLX windows as unexpected ones.
JScript
function Test() { var p, unexpWnd; p = Sys.Process("MyApplication"); // Do something ... // Handle possible unexpected window unexpWnd = p.WaitWindow("QWidget", "Error", -1, 1000); if (unexpWnd.Exists) { // Post the window image to the log Log.Picture(unexpWnd.Picture(), "Unexpected window detected."); // Close unexpected window unexpWnd.Close(); } // Continue testing ... }
источник
Количество пользователей, читающих эту тему: 1
0 пользователей, 1 гостей, 0 анонимных