|
回复 4# 的帖子
做点必要的修改,
Browser("AA").Page("BB").Link("qtp_reference_guide_cn.pdf").Click
wait(1)
Browser("Browser_2").Dialog("File Download").WinButton("Save").Type micLeft
wait(1)
Browser("Browser_2").Dialog("File Download").WinButton("Open").Type micRight
wait(1)
Browser("Browser_2").Dialog("File Download").Type micReturn
wait(1)
Dialog("File Download").Dialog("Save As").WinToolbar("ToolbarWindow32").Press "My Computer"
wait(1)
'Change to D: disk
Dialog("File Download").Dialog("Save As").WinListView("SysListView32").Activate " (C"
wait(1)
'Change to your folder
Dialog("File Download").Dialog("Save As").WinListView("SysListView32").Activate "Logs"
wait(1)
Dialog("File Download").Dialog("Save As").WinComboBox("Save as type:").Select "All Files"
wait(1)
'26 is the default length of existing file name, change it
Dialog("File Download").Dialog("Save As").WinEdit("File name:").SetSelection 0,26
wait(1)
tempYear = Year(Date)
tempMonth = Month(Date)
tempDay = Day(Date)
tempHour = Hour(time)
tempMinute = Minute(time)
finalstr = tempYear&tempMonth&tempDay&tempHour&tempMinute&".rar"
print finalstr
Dialog("File Download").Dialog("Save As").WinEdit("File name:").Set tempYear&tempMonth&tempDay&tempHour&tempMinute&".rar"
wait(1)
Dialog("File Download").Dialog("Save As").WinButton("Save").Click |
|