VBA-makro zum öffnen von Mozilla Firefox

Hallo ich habe kommen mit einem code, öffnen Sie Internet Explorer, navigieren Sie zu einer website, geben Sie die Benutzer-id und Passwort ein und klicken Sie abschließend auf die Schaltfläche "login".

Der code ist:

Public Sub LOGIN()

    Dim objIE As SHDocVw.InternetExplorer 
    Dim htmlDoc As MSHTML.HTMLDocument 
    Dim htmlInput As MSHTML.HTMLInputElement
    Dim htmlColl As MSHTML.IHTMLElementCollection

    Set objIE = New SHDocVw.InternetExplorer

    With objIE
        .Navigate "https://website.co.in" ' Main page
        .Visible = 1
        Do While .READYSTATE <> 4: DoEvents: Loop
        Application.Wait (Now + TimeValue("0:00:02"))

        Set htmlDoc = .document
        Set htmlColl = htmlDoc.getElementsByTagName("INPUT")
        Do While htmlDoc.READYSTATE <> "complete": DoEvents: Loop
        For Each htmlInput In htmlColl
            If htmlInput.Name = "UserName" Or htmlInput.Type = "text" Then
                htmlInput.Value = "Adidas"
            Else
               If htmlInput.Name = "password" Then
                 htmlInput.Value = "Daddy123"

                End If
            End If
        Next htmlInput

        Set htmlDoc = .document
        Set htmlColl = htmlDoc.getElementsByTagName("input")
        Do While htmlDoc.READYSTATE <> "complete": DoEvents: Loop
        For Each htmlInput In htmlColl
            If Trim(htmlInput.Type) = "submit" Then
                htmlInput.Click
                Exit For
            End If
        Next htmlInput
    End With
End Sub

Aber als die website, für die ich geschaffen habe dieses Skript nicht unterstützt Internet Explorer ich das öffnen will das gleiche in Firefox. Ich bin ratlos und ich habe nicht versucht, alles so weit. Bitte helfen Sie mir.

  • Leider ja 🙁 ich habe keine Ahnung, wie man über diese
  • Gehen wir zurück zu dem ursprünglichen problem. Sie sagen, dass die website nicht unterstützt Internet Explorer? Also, was ist Los mit ihm? (Mit der Webseite ist.)
  • Auch, sind Sie sicher, dass Sie speichern möchten, ein Passwort unverschlüsselt in einer Klartext-Datei?
  • Dieser code wird von mir aber ich weiß nicht, wie lanch Firefox.
  • Ja Mr. Lister. Die website war in Ordnung, die in IE, aber vor kurzem änderungen vorgenommen wurde, die auf dieser website, und es funktioniert nur auf Firefox.
  • Haben Sie einen Blick auf diese post vbforums.com/... oder computing.net/answers/programming/...
  • Er will automatisieren Sie die Seite in Firefox, nicht nur rufen Sie es im browser.

InformationsquelleAutor user2165404 | 2013-03-26
Schreibe einen Kommentar