Перейти к содержимому

Публикации t.barabanov

2 публикаций создано t.barabanov (учитываются публикации только с 20 апреля 2023)


#96210 Как поймать и обработать неожиданное окно flash.

Отправлено автор: t.barabanov 25 октября 2011 - 19:36 в SmartBear (AutomatedQA) - Functional Testing

Remarks

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.
To handle unexpected windows in Flash, Flex and CLX applications, use the WaitWindow or FindChild method to check if a modal window appears after your test performs actions that can lead to this. The following code snippet demonstrates this:

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
  ...
}

источник



#95596 Как поймать и обработать неожиданное окно flash.

Отправлено автор: t.barabanov 17 октября 2011 - 14:55 в SmartBear (AutomatedQA) - Functional Testing

TC 8.5
JScript
Web|Flash

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