|
脚本编写的是其他系统的,可是run的时候先弹出qtp自带的订票系统首页,然后才是我脚本里面的页面。怎么设置关闭订票系统页面?
脚本如下:
Dim ie
Dim bFind,bFindFour
Dim strURL
Dim t1,t2
Dim str
Const delayNum = 1
On error resume next
set ie = createobject("internetexplorer.application")
ie.Visible = true
ie.Silent = true
strURL = "http://192.168.1.248:9999"
ie.Navigate(strURL)
t1 = timer
Do while t2 - t1 < delayNum
t2 = timer
Loop
services.StartTransaction "Login"
'账号登陆
ie.Document.getElementById("ctl07_UserName").value = "zhuzhengyu"
ie.Document.getElementById("ctl07_Password").value = "111111"
ie.Document.getElementById("ctl07_LoginButton").click
t1 = timer
Do while t2 - t1 < delayNum
t2 = timer
Loop
'strURL = ie.Document.getElementById("UCUserLogin_Ma_Ac_05_lesp").Innertext
str =ie.document.documentelement.innerhtml
bFind = 0
bFindFour = 0
bFind = instr(1,str,"您目前的学分排名",1)
bFindFour = instr(1,str,"404",1)
If bFind <> 0 and bFindFour = 0 Then
services.EndTransaction "Login",Pass
else
services.EndTransaction "Login",Fail
End If
ie.Quit
Set ie = nothing |
|