您现在的位置是:首页 > 电脑 > 

在Mac OS X中无法使用Webdriver?(Cannot use Webdriver in Mac OS X ?)

2025-07-18 09:08:04
在Mac OS X中无法使用Webdriver?(Cannot use Webdriver in Mac OS X ?) 这是StackTrace: 我的操作系统版本是10.11.2(15C50) Here is the StackTrace: My OS version is 10.11.2 (15C50) 最满意答
在Mac OS X中无法使用Webdriver?(Cannot use Webdriver in Mac OS X ?)

这是StackTrace:

我的操作系统版本是10.11.2(15C50)

Here is the StackTrace:

My OS version is 10.11.2 (15C50)

最满意答案

它正在发生,因为硒无法检测到你的Firefox的位置。 您需要设置System.setProperty以帮助selenium了解系统中firefox的位置

根据https:///SeleniumHQ/selenium/wiki/FirefoxDriver ,您必须设置一个属性来设置二进制路径:

webdriver.firefox.bin

对于我的系统,我在下面的位置有firefox: -

System.setProperty("webdriver.firefox.bin","/Applicati/Firefox20.0"); WebDriver driver = new FirefoxDriver();

有些系统的位置如下: -

System.setProperty("webdriver.firefox.bin","/Applicati/Firefox.app/Contents/MacOS/firefox-bin");

要么

以下链接有一些问题: -

无法在Maven中使用Selenium连接二进制FirefoxBinary

希望它能帮到你:)

It is happening because selenium is not able to detect the location of your firefox. You need to set System.setProperty to assist selenium about the location of firefox in your system

According to https:///SeleniumHQ/selenium/wiki/FirefoxDriver there is a property you have to set to set the binary path:

webdriver.firefox.bin

For my system I have firefox in below location:-

System.setProperty("webdriver.firefox.bin","/Applicati/Firefox20.0"); WebDriver driver = new FirefoxDriver();

Some system have location as below:-

System.setProperty("webdriver.firefox.bin","/Applicati/Firefox.app/Contents/MacOS/firefox-bin");

OR

There is a issue of some addi for that refer below link :-

Failed to connect to binary FirefoxBinary with Selenium in Maven

Hope it will help you :)

#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格

本文地址:http://www.dnpztj.cn/diannao/50294.html

相关标签:无
上传时间: 2023-04-14 14:39:37
留言与评论(共有 12 条评论)
本站网友 更符合
11分钟前 发表
在Mac OS X中无法使用Webdriver?(Cannot use Webdriver in Mac OS X ?) 这是StackTrace: 我的操作系统版本是10.11.2(15C50) Here is the StackTrace
本站网友 亚欧铁路
13分钟前 发表
"/Applicati/Firefox.app/Contents/MacOS/firefox-bin"); 要么 以下链接有一些问题: - 无法在Maven中使用Selenium连接二进制FirefoxBinary 希望它能帮到你
本站网友 生乳汁
30分钟前 发表
在Mac OS X中无法使用Webdriver?(Cannot use Webdriver in Mac OS X ?) 这是StackTrace: 我的操作系统版本是10.11.2(15C50) Here is the StackTrace
本站网友 李嘉欣怀孕
30分钟前 发表
"/Applicati/Firefox.app/Contents/MacOS/firefox-bin"); OR There is a issue of some addi for that refer below link
本站网友 杭州快递
13分钟前 发表
///SeleniumHQ/selenium/wiki/FirefoxDriver
本站网友 prp注射美容
29分钟前 发表
)
本站网友 别和自己过不去
24分钟前 发表
webdriver.firefox.bin For my system I have firefox in below location
本站网友 黑店百地
10分钟前 发表
"/Applicati/Firefox20.0"); WebDriver driver = new FirefoxDriver(); Some system have location as below
本站网友 碧桂园金沙滩
21分钟前 发表
因为硒无法检测到你的Firefox的位置
本站网友 诫勉
21分钟前 发表
- System.setProperty("webdriver.firefox.bin"
本站网友 人为什么会害怕
25分钟前 发表
)