关于Clipboard的用法,来自于QTP帮助!
上一篇 /
下一篇 2009-06-24 10:43:39
/ 个人分类:QTP
- How can I record on nonstandard menus?
You can modify how QuickTest behaves when it records menus. The options that control this behavior. are located in the Advanced Windows Applications Options dialog box. (Tools > Options > Windows Applications > Advanced).
For more information, see theHP QuickTest Professional Add-ins Guide.
- How can I terminate an application that is not responding?
You can terminate any standard application while running a test in QuickTest by adding one of the following steps to the test:
- SystemUtil.CloseProcessByName "app.exe"
- SystemUtil.CloseProcessByWndTitle "Some Title"
- 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 QuickTest run session.
The Clipboardobject has the same methods as the Clipboardobject available in Visual Basic:
- Clear
- GetData
- GetFormat
- GetText
- SetData
- SetText
For more information on these methods, refer tohttp://msdn.microsoft.com/library/en-us/vb98/html/vbobjclipboard.asp?frame=true.
Below is an example of Clipboardobject usage:
Set MyClipboard = CreateObject("Mercury.Clipboard")
MyClipboard.Clear
MyClipboard.SetText "TEST"
MsgBox MyClipboard.GetText
收藏
举报
TAG: