通过谷歌浏览器Excel VBA打开登录网站

问题描述 投票:0回答:1

我正在尝试打开一个需要用户名和密码才能通过 Google Chrome 使用 Excel 登录的网站。我已经选择了“Selenium Type Library”参考。当我运行我的代码时(如下所示),我收到运行时错误 33。 预先感谢您的帮助

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

excel vba selenium-webdriver runtime-error geturl
1个回答
0
投票

这可能是驱动程序和网络浏览器之间不兼容。您是否搜索过“vba 错误 33”

错误号:33:尝试使用 SeleniumBasic 模拟 chrome 浏览器时,SessionNotCreatedError 会话未创建未知错误异常

© www.soinside.com 2019 - 2024. All rights reserved.