最新消息:20210917 已从crifan.com换到crifan.org

【已解决】Mac macOS BigSur中geckodriver报错:无法打开geckodriver,因为Apple无法检查其是否包含恶意软件

包含 crifan 950浏览 0评论
折腾:
【未解决】Selenium中用js新建窗口再切换窗口
期间,此处Mac版本是:
macOS Big Sur
11.3.1
去看看 geckodriver的版本
结果弹框:
无法打开“geckodriver”,因为Apple无法检查其是否包含恶意软件。
此软件需要更新。请联系开发者了解更多信息。
 geckodriver --version
[1]    38597 killed     geckodriver --version
试试help,问题依旧:
无法打开“geckodriver”,因为Apple无法检查其是否包含恶意软件
Apple 无法检查 App 是否包含恶意软件 – Apple 支持
去设置中看看
看到提示:
已阻止使用 geckodriver,因为来自身份不明的开发者
点击 仍然允许
即可消除提示:
再去试试
无法打开“geckodriver”,因为Apple无法检查其是否包含恶意软件。
此软件需要更新。请联系开发者了解更多信息。
点击打开
可以输出版本信息了:
 ✘ crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/selenium  geckodriver --help
geckodriver 0.29.1 (970ef713fe58 2021-04-08 23:34 +0200)
WebDriver implementation for Firefox


USAGE:
    geckodriver [FLAGS] [OPTIONS]


FLAGS:
        --connect-existing    Connect to an existing Firefox instance
    -h, --help                Prints this message
        --jsdebugger          Attach browser toolbox debugger for Firefox
    -v                        Log level verbosity (-v for debug and -vv for trace level)
    -V, --version             Prints version and copying information


OPTIONS:
        --android-storage <ANDROID_STORAGE>    Selects storage location to be used for test data (deprecated). [possible values:
                                               auto, app, internal, sdcard]
    -b, --binary <BINARY>                      Path to the Firefox binary
        --log <LEVEL>                          Set Gecko log level [possible values: fatal, error, warn, info, config, debug,
                                               trace]
        --marionette-host <HOST>               Host to use to connect to Gecko [default: 127.0.0.1]
        --marionette-port <PORT>               Port to use to connect to Gecko [default: system-allocated port]
        --host <HOST>                          Host IP to use for WebDriver server [default: 127.0.0.1]
    -p, --port <PORT>                          Port to use for WebDriver server [default: 4444]
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/selenium 
再去看看版本:
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/selenium  geckodriver --version
geckodriver 0.29.1 (970ef713fe58 2021-04-08 23:34 +0200)


The source code of this program is available from
testing/geckodriver in https://hg.mozilla.org/mozilla-central.


This program is subject to the terms of the Mozilla Public License 2.0.
You can obtain a copy of the license at https://mozilla.org/MPL/2.0/.
可以正常使用了。
【总结】
此处新版Mac 
macOS Big Sur 11.3.1
安全性更高了。
搞得去查看geckodriver的版本或help信息
geckodriver --version
geckodriver --help
都不给。
会提示:
无法打开“geckodriver”,因为Apple无法检查其是否包含恶意软件。
此软件需要更新。请联系开发者了解更多信息。
解决办法:
去系统设置-》安全性与隐私-》通用
能看到提示:
已阻止使用 geckodriver,因为来自身份不明的开发者
点击
仍然允许
后续再去:
geckodriver --version
或:
geckodriver --help
还会提示一次,再点击:打开。
后续即可正常运行。

转载请注明:在路上 » 【已解决】Mac macOS BigSur中geckodriver报错:无法打开geckodriver,因为Apple无法检查其是否包含恶意软件

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
90 queries in 0.187 seconds, using 23.33MB memory