【问题标题】:Wait for a Button to load Vbscript等待按钮加载 Vbscript
【发布时间】:2016-02-08 11:31:13
【问题描述】:

这是我的代码:

'What do i put here to wait until V that down there exists before continuing?

ie.Document.getElementById(":zv.gt").Click

'Do While ie.Busy Or ie.ReadyState <> 4: WScript.Sleep 5000: Loop <---- Wont work because the button doesnt actually popup until after the Page is already finished loading.

在继续之前我要让它不断检查按钮是否存在?

【问题讨论】:

    标签: vbscript


    【解决方案1】:

    这似乎成功了。谢谢 StackOverflow。

     'Waits for button to load and clicks the button once loaded
        '----------------------------------------------------------------------
        Do  
            On Error Resume Next
            set x = ie.Document.getElementById(":zv.Ss")
            If x is nothing then
               wscript.sleep 200
            else    
                ie.Document.getElementById(":zv.Ss").click
            Exit Do
            end if
            On Error Goto 0   
        Loop
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-02
      相关资源
      最近更新 更多