Working with Windows applications

Relevant for: GUI tests and components

How can I record on nonstandard menus?

You can modify how UFT One behaves when it records menus. The options that control this behavior are located in the Windows Applications > Advanced Options pane. (Tools > Options > GUI Testing tab > Windows Applications node > Advanced node).

How can I terminate an application that is not responding?

You can terminate any standard application while running a test in UFT One by adding one of the following steps to the test:

  • SystemUtil.CloseProcessByName "<app.exe>"
  • SystemUtil.CloseProcessByWndTitle "<Some Title>"

Back to top

Can I copy and paste to and from the Clipboard during a run session?

You can use the Clipboard object to copy, cut, and paste text during a UFT One run session.

The Clipboard object supports the same methods as the Clipboard object available in Visual Basic, such as:

  • Clear
  • GetData
  • GetText
  • SetData
  • SetText

For details on these methods, see http://msdn.microsoft.com/en-us/library/ms172962.aspx.

Below is an example of Clipboard object usage:

Set MyClipboard = CreateObject("Mercury.Clipboard")
MyClipboard.Clear
MyClipboard.SetText "TEST"
MsgBox MyClipboard.GetText

Back to top

See also: