QTP 初起步II-调用其他应用程序
上一篇 /
下一篇 2010-08-27 14:39:38
/ 个人分类:QTP
Dim TestData_Location
Dim TestData_Local
Dim Login_Check
TestData_Location="\\"
TestData_Local="E:\Test\"
TestData_Local_Check(TestData_Local)
Login_Check=Log_in( "\\","admin","admin")
CopyFile_Local TestData_Location,Login_Check
Public Function TestData_Local_Check(TestData_Local)
Set fso=CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(TestData_Local) Then
fso.DeleteFolder(TestData_Local)
fso.CreateFolder(TestData_Local)
else
fso.CreateFolder(TestData_Local)
End If
Set fso=nothing
End Function
Public Function Log_in(ip,user,pw)
Set bjShell=CreateObject("Wscript.Shell")
objShell.Run ip
Set bjShell=nothing
wait(2)
Set fso=CreateObject("Scripting.FileSystemObject")
If fso.FileExists(TestData_Location) Then
Log_in=True
Else
Log_in=False
End If
Set fso=nothing
End Function
Public Function CopyFile_Local(location,login_check)
If login_check Then
Set fso=CreateObject("Scripting.FileSystemObject")
fso.CopyFile location,TestData_Local
Set fso=nothing
End If
End Function
Public Function UnzipFile()
End Function
收藏
举报
TAG: