|
我现在写了一个脚本,是在一个页面做新增动作,新增的数据是从数据库中查询出来的,但是在回放脚本时,(假如此时我查出的数据是eric001),则robot只在输入框中输入数字信息:001,不会输入eric,这是怎么回事啊?望高手指教
下面是我得脚本:
Sub Main
Dim Result As Integer
'Initially Recorded: 2005-4-18 19:25:44
'Script Name: 123
'SQL脚本
Dim connection ,i As long
Dim retcode As Variant
dim outputstr,query as string
Dim out(1 To 1,1 to 2) As Variant
connection = SQLOpen("DSN=LocalServer;UID=sa;PWD=sa", outputstr,)
query = "select employeeid from PSNACCESSIONINFO"
retcode = SQLExecQuery(connection,query)
retcode = SQLRetrieve(connection,out())
i=1
while i<3
Window SetContext, "Caption=GameTest - Microsoft Internet Explorer", ""
Browser SetFrame,"Type=HTMLFrame;HTMLId=WorkSpace;\;Type=HTMLFrame;HTMLId=Disp",""
Browser NewPage,"HTMLTitle=3G游戏",""
EditBox Click, "Type=EditBox;Name=txtName", "Coords=84,9"
InputKeys out(1,i)
ComboBox Click, "Type=ComboBox;Name=ddlItemName", ""
ComboListBox Click, "Type=ComboListBox;Name=ddlItemName", "Text=game"
Browser NewPage,"HTMLTitle=3G手机",""
PushButton Click, "Type=PushButton;Name=cmdAdd"
Window SetContext, "Caption=Microsoft Internet Explorer", ""
PushButton Click, "Text=确定"
i=i+1
wend
retcode = SQLClose(connection)
End Sub |
|