<tfoot id='vIqZA'></tfoot>
  • <small id='vIqZA'></small><noframes id='vIqZA'>

    1. <i id='vIqZA'><tr id='vIqZA'><dt id='vIqZA'><q id='vIqZA'><span id='vIqZA'><b id='vIqZA'><form id='vIqZA'><ins id='vIqZA'></ins><ul id='vIqZA'></ul><sub id='vIqZA'></sub></form><legend id='vIqZA'></legend><bdo id='vIqZA'><pre id='vIqZA'><center id='vIqZA'></center></pre></bdo></b><th id='vIqZA'></th></span></q></dt></tr></i><div id='vIqZA'><tfoot id='vIqZA'></tfoot><dl id='vIqZA'><fieldset id='vIqZA'></fieldset></dl></div>

        <bdo id='vIqZA'></bdo><ul id='vIqZA'></ul>
    2. <legend id='vIqZA'><style id='vIqZA'><dir id='vIqZA'><q id='vIqZA'></q></dir></style></legend>
      1. 如何在 Windows 10 上安装 ChromeDriver 并使用 Chrome 运行 Selenium 测试?

        How do I install ChromeDriver on Windows 10 and run Selenium tests with Chrome?(如何在 Windows 10 上安装 ChromeDriver 并使用 Chrome 运行 Selenium 测试?)
            <tbody id='2U1rK'></tbody>

            • <bdo id='2U1rK'></bdo><ul id='2U1rK'></ul>
            • <tfoot id='2U1rK'></tfoot>

              <small id='2U1rK'></small><noframes id='2U1rK'>

              <legend id='2U1rK'><style id='2U1rK'><dir id='2U1rK'><q id='2U1rK'></q></dir></style></legend>

              • <i id='2U1rK'><tr id='2U1rK'><dt id='2U1rK'><q id='2U1rK'><span id='2U1rK'><b id='2U1rK'><form id='2U1rK'><ins id='2U1rK'></ins><ul id='2U1rK'></ul><sub id='2U1rK'></sub></form><legend id='2U1rK'></legend><bdo id='2U1rK'><pre id='2U1rK'><center id='2U1rK'></center></pre></bdo></b><th id='2U1rK'></th></span></q></dt></tr></i><div id='2U1rK'><tfoot id='2U1rK'></tfoot><dl id='2U1rK'><fieldset id='2U1rK'></fieldset></dl></div>

                  本文介绍了如何在 Windows 10 上安装 ChromeDriver 并使用 Chrome 运行 Selenium 测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我们有一个 Ubuntu 服务器,用于在 Chrome 和 Firefox 上运行 Selenium 测试(我安装了 ChromeDriver),我还想在我的 Windows 10 计算机上本地运行测试.我想保持两台计算机的 Python 代码相同.但我没有找到如何在 Windows 10 上安装 ChromeDriver?我在文档中没有找到它 [1, 2].

                  We have an Ubuntu server which we use for running Selenium tests with Chrome and Firefox (I installed ChromeDriver) and I also want to run the tests locally on my Windows 10 computer. I want to keep the Python code the same for both computers. But I didn't find out how to install the ChromeDriver on Windows 10? I didn't find it on the documentation [1, 2].

                  这是在 Chrome 中运行测试的代码:

                  Here is the code that runs the test in Chrome:

                  import unittest
                  from selenium import webdriver
                  
                  class BaseSeleniumTestCase(unittest.TestCase):
                      ...
                      ...
                      ...
                      ...
                  
                      def start_selenium_webdriver(self, chrome_options=None):
                          ...
                          self.driver = webdriver.Chrome(chrome_options=chrome_options)
                          ...
                  

                  我还发现了 如何在中运行 Selenium WebDriver 测试用例Chrome?但它似乎不在Python中(没有标记任何编程语言,它是什么?)

                  I also found How to run Selenium WebDriver test cases in Chrome? but it seems to be not in Python (no programming language is tagged, what is it?)

                  更新 #1: 我在 https://sites.google.com/a/chromium.org/chromedriver/getting-started,但是如果我想为两者保留相同的 Python 代码,我应该将文件放在 Windows 10 的哪个位置电脑?

                  Update #1: I found some Python code in https://sites.google.com/a/chromium.org/chromedriver/getting-started, but where do I put the file in Windows 10 if I want to keep the same Python code for both computers?

                  更新 #2: 我下载了 chromedriver.exe 并将其放在 C:Windows 中,它可以工作,但我没有看到它记录在任何地方.

                  Update #2: I downloaded and put chromedriver.exe in C:Windows and it works, but I didn't see it documented anywhere.

                  推荐答案

                  正如 Uri 在问题中所说,在 Update #2 下,下载最新版本的 chromedriver 并将其放置在 C:Windows纠正问题.

                  As Uri stated in the question, under Update #2, downloading the latest release of chromedriver and placing it in C:Windows corrects the issue.

                  当浏览器窗口打开(以及命令提示符窗口)时,Chrome 挂起时遇到了同样的问题.

                  I had the same issue with Chrome hanging when the browser window opens (alongside a command prompt window).

                  可以在以下位置找到最新的驱动程序:

                  The latest drivers can be found at:

                  https://sites.google.com/a/chromium.org/chromedriver/下载

                  chromedriver_win32.zip 文件中的版本在我的 64 位系统上运行.

                  The version in the chromedriver_win32.zip file is working on my 64-bit system.

                  这篇关于如何在 Windows 10 上安装 ChromeDriver 并使用 Chrome 运行 Selenium 测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Kivy 1.9.0 Windows package KeyError: #39;rthooks#39;(Kivy 1.9.0 Windows 包 KeyError: rthooks)
                  Python Kivy: how to call a function on button click?(Python Kivy:如何在按钮单击时调用函数?)
                  How to disable a widget in Kivy?(如何禁用 Kivy 中的小部件?)
                  Centering an object in Kivy(在 Kivy 中将对象居中)
                  How to downgrade to Python 3.4 from 3.5(如何从 Python 3.5 降级到 Python 3.4)
                  Change button or label text color in kivy(在kivy中更改按钮或标签文本颜色)
                  <tfoot id='d57Tu'></tfoot>
                    <tbody id='d57Tu'></tbody>
                    <bdo id='d57Tu'></bdo><ul id='d57Tu'></ul>
                  • <small id='d57Tu'></small><noframes id='d57Tu'>

                  • <i id='d57Tu'><tr id='d57Tu'><dt id='d57Tu'><q id='d57Tu'><span id='d57Tu'><b id='d57Tu'><form id='d57Tu'><ins id='d57Tu'></ins><ul id='d57Tu'></ul><sub id='d57Tu'></sub></form><legend id='d57Tu'></legend><bdo id='d57Tu'><pre id='d57Tu'><center id='d57Tu'></center></pre></bdo></b><th id='d57Tu'></th></span></q></dt></tr></i><div id='d57Tu'><tfoot id='d57Tu'></tfoot><dl id='d57Tu'><fieldset id='d57Tu'></fieldset></dl></div>

                            <legend id='d57Tu'><style id='d57Tu'><dir id='d57Tu'><q id='d57Tu'></q></dir></style></legend>