• <legend id='cmASh'><style id='cmASh'><dir id='cmASh'><q id='cmASh'></q></dir></style></legend>

    • <bdo id='cmASh'></bdo><ul id='cmASh'></ul>

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

    <small id='cmASh'></small><noframes id='cmASh'>

      1. MAC 上的 Selenium,消息:“chromedriver"可执行文件

        时间:2023-10-08
        • <small id='e8vPp'></small><noframes id='e8vPp'>

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

            1. <tfoot id='e8vPp'></tfoot>
                    <tbody id='e8vPp'></tbody>
                • <legend id='e8vPp'><style id='e8vPp'><dir id='e8vPp'><q id='e8vPp'></q></dir></style></legend>
                  本文介绍了MAC 上的 Selenium,消息:“chromedriver"可执行文件可能具有错误的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我只是想在我的 Mac 上使用 selenium 做一些非常基本的事情,我什至无法打开网页.我收到以下错误:

                  I'm just trying to do something very basic on my Mac using selenium and I can't even open a webpage. I'm getting an error of :

                  Traceback (most recent call last):
                    File "/Users/godsinred/Desktop/InstagramLiker/GmailAccountGenerator.py", line 10, in <module>
                      driver = webdriver.Chrome()
                    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
                      self.service.start()
                    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 88, in start
                      os.path.basename(self.path), self.start_error_message)
                  selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
                  

                  下面是我的代码:

                  from selenium import webdriver
                  import time
                  
                  link = "https://accounts.google.com"
                  driver = webdriver.Chrome()
                  driver.get(link)
                  time.sleep(5)
                  
                  driver.quit()
                  

                  推荐答案

                  错误说明了一切:

                  selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
                  

                  错误清楚地提到被检测到的 chromedriver 有错误的权限.

                  The error clearly mentions that the chromedriver which is getting detected have wrong permissions.

                  • 从 ChromeDriver 下载最新的 chromedriver 二进制文件 -WebDriver for Chrome 并将其保存在您的系统中.
                  • 确保 chromedriver 二进制文件具有所需的权限.
                  • 在启动 WebDriverWebClient 时,传递参数 executable_path 以及 chromedriver 的绝对路径 二进制如下:

                  • Download the latest chromedriver binary from ChromeDriver - WebDriver for Chrome and save it in your system.
                  • Ensure that chromedriver binary have the required permissions.
                  • While initiating the WebDriver and WebClient pass the argument executable_path along with the absolute path of the chromedriver binary as follows :

                  from selenium import webdriver
                  
                  link = "https://accounts.google.com"
                  driver = webdriver.Chrome(executable_path='/path/to/chromedriver')
                  driver.get(link)
                  

                  您可以在以下位置找到详细的相关讨论:

                  You can find a detailed relevant discussion in:

                  • 'Webdrivers'可执行文件可能有错误的权限.请参阅 https://sites.google.com/a/chromium.org/chromedriver/home

                  这篇关于MAC 上的 Selenium,消息:“chromedriver"可执行文件可能具有错误的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:WebDriverException:服务 U:/Scraping/chromedriver.exe 意外退 下一篇:TypeError:“WebElement"对象不是可迭代的错误

                  相关文章

                  最新文章

                      <bdo id='qbK3T'></bdo><ul id='qbK3T'></ul>

                    <small id='qbK3T'></small><noframes id='qbK3T'>

                    <legend id='qbK3T'><style id='qbK3T'><dir id='qbK3T'><q id='qbK3T'></q></dir></style></legend><tfoot id='qbK3T'></tfoot>

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