Skip to content

selenium error: OpenQA.Selenium.WebDriverArgumentException: 'binary is not a Firefox executable' #2178

@ghost

Description

System

  • Version: geckodriver-v0.34.0-win32
  • Platform: Windows 10 22H2
  • Firefox: 125.0.2 (64-bits)
  • Selenium: Selenium.WebDriver 4.20.0 (installed using nuget in visual studio 2022 (latest update))

Hi

When specifying a path to the geckodriver in Selenium in C# code like this:

FirefoxOptions options = new FirefoxOptions();
options.BrowserExecutableLocation = Application.StartupPath + "\\geckodriver\\geckodriver.exe";
IWebDriver driver = new FirefoxDriver(options);

I get following exception:

OpenQA.Selenium.WebDriverArgumentException: 'binary is not a Firefox executable'

How to solve this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions