Using WebDriver in LINQPad is pain
Pain #1: Prevented installing Selenium native web drivers(such as "Selenium.Chrome.WebDriver")
In my previous post(https://forum.linqpad.net/discussion/1680/please-dont-prevent-installing-native-package-in-linqpad), LINQPad added support for installing native libraries, this is good.
But packages like Selenium.Chrome.WebDriver does not provide any AssemblyReferences or native libraries, instead, it provides an exe called "chromedriver.exe" that WebDriver used to do bridge to the browser.
Pain #2: Did not using the ".targets" file in nuget package
This "Selenium.Chrome.WebDriver" provide a targets file to code easily, the file like this:
Specifically, LINQPad5 did not respect the BeforeTargets="AfterBuild" field, and not copy anything to "%LocalAppData%\LINQPad\ProcessServer5AnyCPUB" or "%Temp%/LINQPad5/_sgxdmyqf" folder.
LINQPad should copy the "chromedriver.exe" to one of that folder so that I can write code easily and don't need to find where the "chromedriver.exe" is.
In my previous post(https://forum.linqpad.net/discussion/1680/please-dont-prevent-installing-native-package-in-linqpad), LINQPad added support for installing native libraries, this is good.
But packages like Selenium.Chrome.WebDriver does not provide any AssemblyReferences or native libraries, instead, it provides an exe called "chromedriver.exe" that WebDriver used to do bridge to the browser.
Pain #2: Did not using the ".targets" file in nuget package
This "Selenium.Chrome.WebDriver" provide a targets file to code easily, the file like this:
$(MSBuildThisFileDirectory)..\driver\chromedriver.exe
$(TargetDir)
Specifically, LINQPad5 did not respect the BeforeTargets="AfterBuild" field, and not copy anything to "%LocalAppData%\LINQPad\ProcessServer5AnyCPUB" or "%Temp%/LINQPad5/_sgxdmyqf" folder.
LINQPad should copy the "chromedriver.exe" to one of that folder so that I can write code easily and don't need to find where the "chromedriver.exe" is.
Comments
FWIW, this should be fixed in .NET Core 3 (there will be a new version of LINQPad to support this when it's released). It has the concept of a "runtimes" folder where you can put native dependencies via convention-based folders.