Selenium.WebDriver.GeckoDriver.Win32 0.35.0

dotnet add package Selenium.WebDriver.GeckoDriver.Win32 --version 0.35.0                
NuGet\Install-Package Selenium.WebDriver.GeckoDriver.Win32 -Version 0.35.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Selenium.WebDriver.GeckoDriver.Win32" Version="0.35.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Selenium.WebDriver.GeckoDriver.Win32 --version 0.35.0                
#r "nuget: Selenium.WebDriver.GeckoDriver.Win32, 0.35.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Selenium.WebDriver.GeckoDriver.Win32 as a Cake Addin
#addin nuget:?package=Selenium.WebDriver.GeckoDriver.Win32&version=0.35.0

// Install Selenium.WebDriver.GeckoDriver.Win32 as a Cake Tool
#tool nuget:?package=Selenium.WebDriver.GeckoDriver.Win32&version=0.35.0                

NuGet package - Selenium WebDriver GeckoDriver

NuGet Package

What's this?

This NuGet package install Gecko Driver for Selenium WebDriver into your Unit Test Project.

"geckodriver(.exe)" does not appear in Solution Explorer, but it is copied to the output folder from the package folder when the build process.

NuGet package restoring ready, and no need to commit "geckodriver(.exe)" binary into source code control repository.

Warning
Since Selenium WebDriver version 4.6 was released in November 2022 or later, it has contained "Selenium Manager", which will automatically download the most suitable version and platform WebDriver executable file. So now, you can run applications that use Selenium and manipulates web browsers without this package. However, due to compatibility and some offline scenarios, we intend to keep this package for the time being.

How to install?

For example, at the package manager console on Visual Studio, enter the following command.

PM> Install-Package Selenium.WebDriver.GeckoDriver

Cross-platform building and publishing

By default - it depends on the OS running the build process

By default, the platform type of the web driver file copied to the output folder depends on the OS running the build process.

  • When you build the project which references the NuGet package of geckodriver on 32bit Windows OS, win32 version of geckodriver will be copied to the output folder.
  • When you build the project which references the NuGet package of geckodriver on 64bit Windows OS, win64 version of geckodriver will be copied to the output folder.
  • When you build it on macOS on Intel CPU hardware, macOS x64 version of geckodriver will be copied to the output folder.
  • When you build it on macOS on Apple CPU hardware, macOS Arm64 version of geckodriver will be copied to the output folder.
  • When you build it on any Linux distributions, Linux x64 version of geckodriver will be copied to the output folder.

Method 1 - Specify "Runtime Identifier"

When you specify the "Runtime Identifier (RID)" explicitly, the platform type of the driver file is the same to the RID which you specified. (it doesn't depends on the which OS to use for build process.)

You can specify RID as a MSBuild property in a project file,

<PropertyGroup>
  <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>

or, as a command-line -r option for dotnet build command.

> dotnet build -r:osx-x64
  • When the RID that starts with "win" and contains "x86" is specified, win32 version of geckodriver will be copied to the output folder.
  • When the RID that starts with "win" and contains "x64" is specified, win64 version of geckodriver will be copied to the output folder.
  • When the RID that starts with "osx" and ends with "x64" is specified, macOS x64 version of geckodriver will be copied to the output folder.
  • When the RID that starts with "osx" and ends with "arm64" is specified, macOS Arm64 version of geckodriver will be copied to the output folder.
  • When the RID that starts with "linux" is specified, Linux x64 version of geckodriver will be copied to the output folder.

If you specify another pattern of RID like "ubuntu.18.04-x64", the platform type of the web driver file which will be copied to the output folder depends on the OS running the build process. (default behavior.)

Method 2 - Specify "GeckoDriverPlatform" msbuild property

You can control which platform version of geckodriver will be copied by specifying "GeckoDriverPlatform" MSBuild property.

"GeckoDriverPlatform" MSBuild property can take one of the following values:

  • "win32"
  • "win64"
  • "mac64"
  • "mac64arm"
  • "linux64"

You can specify "GeckoDriverPlatform" MSBuild property in a project file,

<PropertyGroup>
  <GeckoDriverPlatform>win32</GeckoDriverPlatform>
</PropertyGroup>

or, command-line -p option for dotnet build command.

> dotnet build -p:GeckoDriverPlatform=mac64

The specifying "GeckoDriverPlatform" MSBuild property is the highest priority method to control which platform version of geckodriver will be copied.

If you run the following command on Windows OS,

> dotnet build -r:ubuntu.18.04-x64 -p:GeckoDriverPlatform=mac64

The driver file of macOS x64 version will be copied to the output folder.

How to include the driver file into published files?

"geckodriver(.exe)" isn't included in published files on default configuration. This behavior is by design.

If you want to include "geckodriver(.exe)" into published files, please define _PUBLISH_GECKODRIVER compilation symbol.

define _PUBLISH_GECKODRIVER compilation symbol

Another way, you can define PublishGeckoDriver property with value is "true" in MSBuild file (.csproj, .vbproj, etc...) to publish the driver file instead of define compilation symbol.

  <Project ...>
    ...
    <PropertyGroup>
      ...
      <PublishGeckoDriver>true</PublishGeckoDriver>
      ...
    </PropertyGroup>
...
</Project>

You can also define PublishGeckoDriver property from the command line -p option for dotnet publish command.

> dotnet publish -p:PublishGeckoDriver=true
Note

PublishGeckoDriver MSBuild property always override the condition of define _PUBLISH_GECKODRIVER compilation symbol or not. If you define PublishGeckoDriver MSBuild property with false, then the driver file isn't included in publish files whenever define _PUBLISH_GECKODRIVER compilation symbol or not.

Appendix

Where is geckodriver.exe saved to?

geckodriver(.exe) exists at
" {solution folder} /packages/Selenium.WebDriver.GeckoDriver. {ver} /driver/ {platform}"
folder.

 {Solution folder}/
  +-- packages/
  |   +-- Selenium.WebDriver.GeckoDriver.{version}/
  |       +-- driver/
  |       |   +-- win32
  |       |       +-- geckodriver.exe
  |       |   +-- win64
  |       |       +-- geckodriver.exe
  |       |   +-- mac64
  |       |       +-- geckodriver
  |       |   +-- mac64arm
  |       |       +-- geckodriver
  |       |   +-- linux64
  |       |       +-- geckodriver
  |       +-- build/
  +-- {project folder}/
      +-- bin/
          +-- Debug/
          |   +-- geckodriver(.exe) (copy from above by build process)
          +-- Release/
              +-- geckodriver(.exe) (copy from above by build process)

And package installer configure MSBuild task such as .csproj to copy geckodriver(.exe) into the output folder during the build process.

License

The build script (.targets file) in this NuGet package is licensed under The Unlicense.

The binary files of GeckoDriver are licensed under the Mozilla Public License.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.35.0 285 8/6/2024
0.33.0 1,769 4/3/2023
0.32.2 1,189 2/8/2023
0.32.1 1,006 2/2/2023
0.32.0 2,281 10/13/2022
0.31.0 2,197 4/11/2022
0.30.0.1 1,404 11/3/2021
0.30.0 1,622 9/17/2021
0.29.1 1,705 4/9/2021
0.29.0 1,543 1/14/2021 0.29.0 is deprecated.
0.26.0.5-beta 1,286 7/12/2020 0.26.0.5-beta is deprecated.
0.26.0.3 1,907 6/28/2020 0.26.0.3 is deprecated.
0.26.0.3-beta 1,310 5/25/2020 0.26.0.3-beta is deprecated.
0.26.0.1 1,894 4/3/2020 0.26.0.1 is deprecated.
0.26.0 8,161 10/13/2019 0.26.0 is deprecated.
0.25.0 1,882 9/10/2019 0.25.0 is deprecated.
0.24.0.1 1,881 9/3/2019 0.24.0.1 is deprecated.
0.24.0 9,538 1/29/2019 0.24.0 is deprecated.
0.23.0.3 3,433 11/21/2018 0.23.0.3 is deprecated.
0.23.0 3,386 10/4/2018 0.23.0 is deprecated.
0.22.0 2,533 9/16/2018 0.22.0 is deprecated.
0.21.0 14,796 6/18/2018 0.21.0 is deprecated.
0.20.1 13,765 4/8/2018 0.20.1 is deprecated.
0.20.0 3,432 3/13/2018 0.20.0 is deprecated.
0.19.1 9,549 11/1/2017 0.19.1 is deprecated.
0.19.0 3,573 10/17/2017 0.19.0 is deprecated.
0.18.0 6,962 7/11/2017 0.18.0 is deprecated.
0.17.0 100,107 6/9/2017 0.17.0 is deprecated.
0.16.1 46,821 4/26/2017 0.16.1 is deprecated.
0.16.0 2,219 4/24/2017 0.16.0 is deprecated.
0.15.0.4 4,667 4/14/2017 0.15.0.4 is deprecated.
0.15.0.3-beta 1,925 3/22/2017 0.15.0.3-beta is deprecated.
0.15.0.1-beta 1,699 3/8/2017 0.15.0.1-beta is deprecated.
0.15.0 5,114 3/8/2017 0.15.0 is deprecated.
0.14.0.1-beta 1,775 3/3/2017 0.14.0.1-beta is deprecated.
0.14.0 32,890 1/31/2017 0.14.0 is deprecated.
0.13.0 3,924 1/6/2017 0.13.0 is deprecated.
0.12.0 2,373 1/3/2017 0.12.0 is deprecated.
0.11.1 2,668 11/25/2016 0.11.1 is deprecated.

v.0.35.0
- Gecko Driver 0.35.0 release

To see all the change logs, please visit the following URL.
- https://github.com/jsakamoto/nupkg-selenium-webdriver-geckodriver/blob/master/RELEASE-NOTES.txt