3

I am trying to handle chrome alerts through UFT(Unified Funtional Testing)/QTP(Quick Test Professional). There are only a few options such as Insight objects, sendkeys or by coordinate values. I need more robust way to handle these alerts. Like how the selenium does with help of webdriver. Is there any other way to handle alerts externally such that those methods can be triggered through a .vbs file? Please suggest.

Revathi S
  • 31
  • 1
  • 2

1 Answers1

3

UFT has the Browser.HandleDialog functionality which allows clicking OK on alert and confirm dialogs, clicking Cancel on confirm and prompt dialogs and entering values for prompt dialogs.

Usage:

Browser("B").HandleDialog micOK

Browser("B").HandleDialog micCancel

Browser("B").HandleDialog micOK, "value for prompt dialog"
Motti
  • 110,860
  • 49
  • 189
  • 262