using Selenium.PhantomJS.WebDriver with .Net Core
Asked Answered
D

1

10

The NuGet package Selenium.PhantomJS.WebDriver, on building the project, it copies PhantomJS.exe to the bin folder. With classic .Net it works very well.

The problem is that with .NetCore this doesn't work. I could add the file to the solution directly, specifying to copyOnBuild but I would like to avoid it. Any suggestions?

Thanks.

Diestock answered 10/2, 2017 at 17:48 Comment(2)
Did you find a solution for this problem? Just stumbled upon the same problem.Schiller
Not yet buddy. In the end I went for some manual workaround, but not a proper solution.Diestock
E
0

There could be two workaround came to my mind;

If you have chance to use such a custom tool like CopyLocalLockFileAssemblies, you can try below in your .csproj

<PropertyGroup>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Second option:

xcopy "$(SolutionDir)packages\Selenium.PhantomJS.WebDriver.{version}\tools\phantomjs.exe" "$(TargetDir)"

You can put this command in the postbuild. I'vent tried, however these might work.

Electromagnetism answered 17/8, 2023 at 14:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.