<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] 1. ChromeDriver與本地chrome瀏覽器的版本不一致 [SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81](https://stackoverflow.com/questions/60296873/sessionnotcreatedexception-message-session-not-created-this-version-of-chrome) **解決方案:** 這是因為ChromeDriver與本地chrome瀏覽器的版本不一致導致 (1)ChromeDriver下載地址:[http://npm.taobao.org/mirrors/chromedriver/](http://npm.taobao.org/mirrors/chromedriver/) 下載到本地,解壓 (2)找到自己的chromedriver安裝位置,一般在/usr/local/bin(或者在/usr/bin)下,將新下載的chromedriver替換老版本的chromedriver <br /> 2. ChromeDriver 驅動文件添加到“環境變量”的Path 中 ``` Traceback (most recent call last): File "C:\Python37\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start stdin=PIPE) File "C:\Python37\lib\subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "C:\Python37\lib\subprocess.py", line 997, in _execute_child startupinfo) FileNotFoundError: [WinError 2] 系統找不到指定的文件。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "baidu_test.py", line 3, in <module> driver = webdriver.Chrome() File "C:\Python36\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in __init__ self.service.start() File "C:\Python37\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home ``` **解決方案:** 需要將 Chrome 瀏覽器對應的 ChromeDriver 驅動文件添加到“環境變量”的Path 中。 <br /> **各瀏覽器驅動下載地址如下:** GeckoDriver(Firefox):https://github.com/mozilla/geckodriver/releases ChromeDriver(Chrome):https://sites.google.com/a/chromium.org/chromedriver/home IEDriverServer(IE):http://selenium-release.storage.googleapis.com/index.html OperaDriver(Opera):https://github.com/operasoftware/operachromiumdriver/releases MicrosoftWebDriver(Edge):https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver <br /> **(1)設置瀏覽器驅動** 設置瀏覽器的地址非常簡單。 我們可以手動創建一個存放瀏覽器驅動的目錄,如: C:\\driver , 將下載的瀏覽器驅動文件(例如:chromedriver、geckodriver)丟到該目錄下。 我的電腦-->屬性-->系統設置-->高級-->環境變量-->系統變量-->Path,將“C:\\driver”目錄添加到Path的值中。 * Path * ;C:\\driver <br/> **(2)驗證不同的瀏覽器驅動是否正常使用** ``` from selenium import webdriver driver = webdriver.Firefox() # Firefox瀏覽器 driver = webdriver.Chrome() # Chrome瀏覽器 driver = webdriver.Ie() # Internet Explorer瀏覽器 driver = webdriver.Edge() # Edge瀏覽器 driver = webdriver.Opera() # Opera瀏覽器 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看