Using WebDriver in LINQPad is pain

edited October 2018
Pain #1: Prevented installing Selenium native web drivers(such as "Selenium.Chrome.WebDriver")

In my previous post(, 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.


Sign In or Register to comment.