错误编号:33:尝试使用SeleniumBasic模拟Chrome浏览器时,SessionNotCreatedError会话未从未知错误创建异常 [英] Error number: 33: SessionNotCreatedError session not created exception from unknown error while trying to simulate chrome browser using SeleniumBasic
问题描述
我一直在使用Internet Explorer提供的COM界面,但是,由于某些站点现在已经转移并且不支持IE,因此我一直在寻找将其替换为 SeleniumBasic
.
由于这对我来说是全新的,所以我处于最基本的水平-我已经下载了Selenium类型库(我从Github下载了
I have been using the COM interface provided by Internet Explorer but, since some sites have now moved on and don't support IE, I have been looking to substitute this with SeleniumBasic
.
As this is completely new to me, I'm at the very basic level - I've downloaded the Selenium Type Library (I've downloaded the Selenium library reference from Github, and referenced is in the module).
I've put in a very basic bit of code to test it out but I'm getting the following error:
Error number: 33 Error description:
SessionNotCreatedError session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"AE85B634088DDFB4B8E7D65A145ADA0F","isDefault":true},"id":1,"name":"","origin":"://"} (Session info: chrome=69.0.3497.100) (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 10.0 x86_64)
The code is;
Sub TestCode()
Dim driver as New Selenium.Chrome
driver.get "www.Google.com"
End Sub
I've tried this with firefox and Edge browsers too but am getting the same issues - any suggestions on what might be going wrong?
This error message...
SessionNotCreatedError session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"AE85B634088DDFB4B8E7D65A145ADA0F","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=69.0.3497.100)
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 10.0 x86_64)
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- You are using chromedriver=2.21
- Release Notes of chromedriver=2.21 clearly mentions the following :
Supports Chrome v46-50
- You are using chrome=69.0
- Release Notes of ChromeDriver v2.42 clearly mentions the following :
Supports Chrome v68-70
So there is a clear mismatch between ChromeDriver v2.21 and the Chrome Browser v69.0
Solution
- Upgrade Selenium to current levels Version 3.14.0.
- Upgrade ChromeDriver to current ChromeDriver v2.42 level.
- Keep Chrome version between Chrome v68-70 levels. (as per ChromeDriver v2.42 release notes)
- Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
- Execute your
@Test
.
Update A
As per florentbr/SeleniumBasic the last version of SeleniumBasic (A Selenium based browser automation framework for VB.Net, Visual Basic Applications and VBScript) seems to be Release v2.0.9.0 only.
As per the CHANGELOG of Release v2.0.9.0 the underlying components are:
- Firefox driver version 2.52.0
- IE driver version 2.52.1
Update B
If you intend to use GeckoDriver with Firefox you can following the matrix below:
这篇关于错误编号:33:尝试使用SeleniumBasic模拟Chrome浏览器时,SessionNotCreatedError会话未从未知错误创建异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!