Internet explorer 检查internet explorer中是否加载了所需的文本
我正在访问一个非常复杂的网站,以至于Msxml2.XMLHTTP无法正常工作。我试着实现自动化Internet explorer 检查internet explorer中是否加载了所需的文本,internet-explorer,vbscript,internet-explorer-8,Internet Explorer,Vbscript,Internet Explorer 8,我正在访问一个非常复杂的网站,以至于Msxml2.XMLHTTP无法正常工作。我试着实现自动化 'Working with createobject("internetexplorer.application") .navigate url Do While .ReadyState = 4: WScript.Sleep 1000: Loop Do While .ReadyState <> 4: WScript.Sleep 1000: Loop .document.bo
'Working
with createobject("internetexplorer.application")
.navigate url
Do While .ReadyState = 4: WScript.Sleep 1000: Loop
Do While .ReadyState <> 4: WScript.Sleep 1000: Loop
.document.body.createtextrange.select
.document.execCommand "copy"
strURL = .document.parentwindow.clipboardData.GetData("text")
.quit
end with
MsgBox strURL
在我的环境中,大多数情况下这会给出结果,但在加载所需文本之前,我不知道如何进行检查。这是一个想法
keepSleeping = false 'is my requirement
keepSleeping=instr(.document.body.innerhtml, "sometext") <> 0
while keepSleeping
WScript.Sleep 20
keepSleeping=instr(.document.body.innerhtml, "sometext")
wend
keepSleeping=false”是我的要求
keepSleeping=instr(.document.body.innerhtml,“sometext”)0
一边睡觉
WScript.Sleep 20
keepSleeping=instr(.document.body.innerhtml,“sometext”)
温德
这是一个想法
keepSleeping = false 'is my requirement
keepSleeping=instr(.document.body.innerhtml, "sometext") <> 0
while keepSleeping
WScript.Sleep 20
keepSleeping=instr(.document.body.innerhtml, "sometext")
wend
keepSleeping=false”是我的要求
keepSleeping=instr(.document.body.innerhtml,“sometext”)0
一边睡觉
WScript.Sleep 20
keepSleeping=instr(.document.body.innerhtml,“sometext”)
温德