【发布时间】:2021-03-26 19:49:16
【问题描述】:
from selenium import webdriver;
browser= webdriver.Firefox();
browser.get('http://www.seleniumhq.org');
当我尝试运行这段代码时,它给了我一个error message:
Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line.
任何想法-高度赞赏!
【问题讨论】:
-
你需要将firefox的webdriver放在你的脚本目录或系统路径中。链接:github.com/mozilla/geckodriver/releases>
标签: python selenium selenium-webdriver firefox geckodriver