我正在尝试打开一个需要用户名和密码才能通过 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
这可能是驱动程序和网络浏览器之间不兼容。您是否搜索过“vba 错误 33”
错误号:33:尝试使用 SeleniumBasic 模拟 chrome 浏览器时,SessionNotCreatedError 会话未创建未知错误异常