51Testing软件测试论坛

标题: 请问如何在脚本里写入系统日期 [打印本页]

作者: bearcat    时间: 2006-7-28 13:44
标题: 请问如何在脚本里写入系统日期
GUI代码如下:

Sub Main
    Dim Result As Integer

    'Initially Recorded: 28/07/2006  3:20:02 PM
    'Script Name: test02
   
    Window SetContext, "Caption=Indents - Requisition", ""
    GenericObject Click, "Text=Indent ToolBar", "Coords=403,13"
   
    Window SetContext, "Caption=Search Indents", ""
    GenericObject Click, "Class=TSWDateEdit;ClassIndex=1", "Coords=14,11"
   InputKeys "28/7/2006{TAB}"

End Sub

我想输入系统日期而不是固定的日期, 怎么实现呢?
新手,请多多帮助,多谢多谢!
作者: ilovejolly    时间: 2006-7-28 14:30
You can use the "Date" method to get the current date.

try to type "Date" in the help file and you will find how to use it
作者: bearcat    时间: 2006-7-28 15:15
万分感谢!
将 InputKeys "28/7/2006{TAB}"改成
Inputkeys Date & d
问题解决!
谢谢!




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2