WebDriverException: unknown error: Runtime.executionContextCreated has invalid 'context': while initializing Chrome browser

前端 未结 1 429
攒了一身酷
攒了一身酷 2020-11-28 16:54

I\'m trying to get started using selenium and have downloaded a chrome driver and put into my classpath. I\'m just trying to get the title right now to see if I can get it t

相关标签:
1条回答
  • 2020-11-28 17:14

    This error message...

    org.openqa.selenium.WebDriverException: unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"11895A1B77AC560388AA2919259E1422","isDefault":true},"id":1,"name":"","origin":"://"}
    

    ...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.

    Your main issue is the version compatibility between the binaries you are using as follows :

    • You are using chromedriver=2.8 which is pretty ancient.
    • You are using chrome=66.0
    • Release Notes of ChromeDriver v2.38 clearly mentions the following :

    Supports Chrome v65-67

    So there is a clear mismatch between ChromeDriver version (v2.8) and the Chrome Browser version (v66.0)

    Solution

    • Upgrade ChromeDriver to current ChromeDriver v2.38 level.
    • Keep Chrome version at Chrome v66.x levels. (as per ChromeDriver v2.38 release notes)
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
    • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
    • Take a System Reboot.
    • Execute your @Test.
    • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
    0 讨论(0)
提交回复
热议问题