<p>此错误消息</p>
<pre><code>selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 76
</code></pre>
<p>…意味着<em>ChromeDriver</em>无法启动/生成新的<em>网络浏览器</em>,即<em>Chrome浏览器</em>会话</p>
<p>您的代码试用和错误堆栈跟踪将帮助我们以更好的方式调试该问题。虽然您提到了适用于linux的兼容Chromedriver</em>,但您的程序在执行时会选择Chromedriver v76.0</strong></p>
<p>您的主要问题是所使用的二进制文件版本之间的不兼容,如下所示:</p>
<ul>
<li><a href="https://chromedriver.storage.googleapis.com/76.0.3809.12/notes.txt" rel="nofollow noreferrer"><em>chromedriver=76.0</em></a>的发行说明明确提到以下内容:</li>
</ul>
<blockquote>
<p>Supports <strong>Chrome version 76</strong></p>
</blockquote>
<hr/>
<h2>解决方案</h2>
<p>确保您有:</p>
<ul>
<li>已从系统中删除所有现有的不同版本的<em>Chromedriver</em></李>
<li><em>ChromeDriver</em>更新为当前<em>ChromeDriver v76.0</em>级别</李>
</ul>
<blockquote>
<p>Additionally, ensure you pick up the latest release of <em>ChromeDriver v76.0</em> i.e. <a href="https://chromedriver.storage.googleapis.com/index.html?path=76.0.3809.126/" rel="nofollow noreferrer">ChromeDriver v76.0.3809.126</a>.</p>
</blockquote>
<ul>
<li><em>Chrome</em>更新为当前的<em>Chrome 76.0</em>版本。(根据<a href="https://chromedriver.storage.googleapis.com/76.0.3809.68/notes.txt" rel="nofollow noreferrer">ChromeDriver v76.0 release notes</a>)</li>
<li><em>通过<em>IDE</em>清理</em>您的<em>项目工作区</em>,并<em>仅使用所需的依赖项重建</em>项目</李>
<li>如果您的基本<em>Web客户端</em>版本太旧,请通过<a href="https://www.revouninstaller.com/revo_uninstaller_free_download.html" rel="nofollow noreferrer"><em>Revo Uninstaller</em></a>卸载它,并安装最新的GA和发布的<em>Web客户端</em>版本</李>
<li>进行<em>系统重新启动</em></李>
<li>以非root用户身份执行<code>@Test</code></李>
<li>始终在<code>tearDown(){}</code>方法中调用<code>driver.quit()</code>以关闭&;优雅地销毁<em>WebDriver</em>和<em>Web客户端</em>实例</李>
</ul>
<hr/>
<h2>参考文献</h2>
<p>有关详细讨论,请参见:</p>
<ul>
<li><a href="https://stackoverflow.com/questions/50692358/how-to-work-with-a-specific-version-of-chromedriver-while-chrome-browser-gets-up/50697221#50697221">How to work with a specific version of ChromeDriver while Chrome Browser gets updated automatically through Python selenium</a></li>
</ul>