mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.2k stars 1.53k forks source link

Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC #2208

Open Ndrotech opened 1 week ago

Ndrotech commented 1 week ago

System

Testcase

package demo;

import org.openqa.selenium.firefox.FirefoxDriver;

public class Sample { public static void main(String[] args) throws InterruptedException { String key="webdriver.gecko.driver"; String value="/Users/ngorai/eclipse-workspace/Selenium/softwares/geckodriver"; System.setProperty(key, value); FirefoxDriver driver = new FirefoxDriver(); driver.navigate().to("https://opensea.io/collection/onchain-gaias/activity");

}

}

Stacktrace

Exception in thread "main" org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: 'Nayans-MacBook-Air.local', ip: '2401:4900:1c01:a365:9d82:6074:1f61:95ae%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '15.0.1', java.version: '22.0.2' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.firefox.FirefoxBinary.(FirefoxBinary.java:100) at java.base/java.util.Optional.orElseGet(Optional.java:364) at org.openqa.selenium.firefox.FirefoxOptions.getBinary(FirefoxOptions.java:216) at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:187) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:147) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:125) at demo.Sample.main(Sample.java:10)

Trace-level log

whimboo commented 1 week ago

Could you please attach a trace-level log from geckodriver?