I installed nuget package - Selenium.WebDriver.ChromeDriver 2.46.0.. When I publish (through dotnet publish .Net CLI command) .csproject (target framework - netcore2.2) the chromedriver.exe is not being copying on output/publish folder.. Can you please someone assist me?
Go to the terminal and type the command: sudo nano /etc/paths. Enter the password. At the bottom of the file, add the path of your ChromeDriver. Type Y to save.
Copy Chromedriver.exe into your project's solution / project folder. Add it to the project in visual studio. Right click the file and choose properties. Build Action should be set to 'Content'.
Users provided relevant link to confirm that, "YES" a full Chrome installation is needed in addition to the actual chromedriver.
From the project owner github page:
"chromedriver(.exe)" isn't included in published files on default configuration. This behavior is by design.
If you want to include "chromedriver(.exe)" into published files, please define _PUBLISH_CHROMEDRIVER
compilation symbol.
OR
Define PublishChromeDriver
property with value to "true" in MSBuild file (.csproj, .vbproj, etc...) to publish the driver file.
<Project ...>
...
<PropertyGroup>
...
<PublishChromeDriver>true</PublishChromeDriver>
...
</PropertyGroup>
...
</Project>
Note: MSBuild property always override the condition of define _PUBLISH_CHROMEDRIVER
compilation symbol
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With