Click on button from webpage based on its TagName (VBScript Code)

Call test

Sub test()
    With CreateObject("InternetExplorer.Application")
        .Visible = True
        .Navigate "https://www.yoursite.com/Signin/"

        Do While .Busy Or .readyState <> 4
            WScript.Sleep 50
        Loop

        Set oInputs = .Document.getElementsByTagName("input")
        For Each elm In oInputs
            If elm.Value = "Sign In" Then
                elm.Click
                Exit For
            End If
        Next

        Do While .Busy Or .readyState <> 4
            WScript.Sleep 50
        Loop
    End With
End Sub

Comments

Popular Posts

Mastering Selenium Exceptions for Robust Test Automation

Mastering Salesforce Testing: A Technical Deep Dive

The Singleton Pattern in Test Automation: Ensuring Consistency and Efficient Resource Management

Future of .NET BDD: An Introduction to ReqnRoll

Mastering Java Collections: Your Secret Weapon for Robust Automation Frameworks