Open a login website via google chrome Excel VBA

236 views Asked by At

I'm trying to open a website thats need username and password to login Via Google Chrome with Excel. I already selected "Selenium Type Library" reference.When i run my codes (As below), i get an Run-time error 33. Thank you in advance for your help

Public Sub seleniumtutorial()
    Dim bot As New Selenium.ChromeDriver
    Dim username As String
    Dim password As String
    Dim URL As String
    URL = "http://auto.lotus.ir/faces/pages/security/login.xhtml?  ignoreAutoLogin=true&message=enableAutoLogin"
    username = "lili"
    password = "123456"
    bot.Get URL
    bot.FindElementByName("j_username").SendKeys username
    bot.FindElementByName("j_password").SendKeys password
    bot.FindElementById("Submit").Click
    bot.Quit


    End Sub

1

There are 1 answers