VBScript to Launch a website login

前端 未结 2 1273
日久生厌
日久生厌 2020-12-19 16:09

I found this script online, I edited most of it.

It is able to enter username, and password on its down but it is not able to click login.

please help me f

相关标签:
2条回答
  • 2020-12-19 16:20

    Here is...

    Call Main
    
    Function Main
        Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
        IE.Visible = True
        IE.Navigate "http://desistream.tv/en/index.shtml"
        Wait IE
        With IE.Document
            .getElementByID("username").value = "myusername"
            .getElementByID("pass").value = "mypassword"
            .getElementsByName("frmLogin")(0).Submit
        End With
    End Function
    
    Sub Wait(IE)
      Do
        WScript.Sleep 500
      Loop While IE.ReadyState < 4 And IE.Busy
    End Sub
    
    0 讨论(0)
  • 2020-12-19 16:29

    If you look at the page source, you'll see that the actual <form> tag is called frmLogin, not login.

    0 讨论(0)
提交回复
热议问题