Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium support? #276

Closed
knocte opened this issue Jul 15, 2016 · 12 comments
Closed

Chromium support? #276

knocte opened this issue Jul 15, 2016 · 12 comments

Comments

@knocte
Copy link
Contributor

knocte commented Jul 15, 2016

If I run "start chrome" from my Program.fs I get:

Unhandled Exception:
OpenQA.Selenium.DriverServiceNotFoundException: The file /usr/local/bin/chromedriver does not exist. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html
  at OpenQA.Selenium.DriverService..ctor (System.String servicePath, Int32 port, System.String driverServiceExecutableName, System.Uri driverServiceDownloadUrl) <0x40c9fbe0 + 0x00217> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService..ctor (System.String executablePath, System.String executableFileName, Int32 port) <0x40c9fa50 + 0x00153> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService (System.String driverPath, System.String driverExecutableFileName) <0x40c72a90 + 0x0004b> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService (System.String driverPath) <0x40c6b330 + 0x0001b> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor (System.String chromeDriverDirectory, OpenQA.Selenium.Chrome.ChromeOptions options, TimeSpan commandTimeout) <0x40c6b2d0 + 0x0001f> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor (System.String chromeDriverDirectory, OpenQA.Selenium.Chrome.ChromeOptions options) <0x40c6b270 + 0x00037> in <filename unknown>:0 
  at canopy.core.start (canopy.BrowserStartMode b) <0x40c68cf0 + 0x004bb> in <filename unknown>:0 
  at <StartupCode$UITest>.$Program.main@ () [0x00053] in /home/andres/Documents/Code/Gatecoin/endtoendtests/UITest/Program.fs:19 
[ERROR] FATAL UNHANDLED EXCEPTION: OpenQA.Selenium.DriverServiceNotFoundException: The file /usr/local/bin/chromedriver does not exist. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html
  at OpenQA.Selenium.DriverService..ctor (System.String servicePath, Int32 port, System.String driverServiceExecutableName, System.Uri driverServiceDownloadUrl) <0x40c9fbe0 + 0x00217> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService..ctor (System.String executablePath, System.String executableFileName, Int32 port) <0x40c9fa50 + 0x00153> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService (System.String driverPath, System.String driverExecutableFileName) <0x40c72a90 + 0x0004b> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService (System.String driverPath) <0x40c6b330 + 0x0001b> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor (System.String chromeDriverDirectory, OpenQA.Selenium.Chrome.ChromeOptions options, TimeSpan commandTimeout) <0x40c6b2d0 + 0x0001f> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor (System.String chromeDriverDirectory, OpenQA.Selenium.Chrome.ChromeOptions options) <0x40c6b270 + 0x00037> in <filename unknown>:0 
  at canopy.core.start (canopy.BrowserStartMode b) <0x40c68cf0 + 0x004bb> in <filename unknown>:0 
  at <StartupCode$UITest>.$Program.main@ () [0x00053] in /home/andres/Documents/Code/Gatecoin/endtoendtests/UITest/Program.fs:19 

Many instructions around the web tell me download a binary... but, hey, I'm using chromium, not chrome, so the equivalent in my world, I guess, is to apt-get install chromium-chromedriver, but I still get the same error after I install this.

So I tried start chromium instead of start chrome and it doesn't compile obviously ("The value or constructor chromium is not defined").

Note: the chromium-chromedriver package installs the executable in /usr/lib/chromium-browser/chromedriver , maybe you should add this search path in canopy too when the /usr/local one is not found?

@lefthandedgoat
Copy link
Owner

I have never tried using chromium and I don't have a linux VM handy at the moment.

Try this

chromeDir <- "/usr/lib/chromium-browser/chromedriver"

And see if it works. If it does not I will try to figure it out tomorrow.

@knocte
Copy link
Contributor Author

knocte commented Jul 15, 2016

chromeDir <- "/usr/lib/chromium-browser/chromedriver"

That doesn't work. But this:

chromeDir <- "/usr/lib/chromium-browser"

does! Thanks!

(Would be nice to include this in canopy somehow, allowing start chromium this way.)

@lefthandedgoat
Copy link
Owner

I can add this tomorrow

On Jul 14, 2016 11:30 PM, "Andres G. Aragoneses" [email protected]
wrote:

chromeDir <- "/usr/lib/chromium-browser/chromedriver"

That doesn't work. But this:

chromeDir <- "/usr/lib/chromium-browser"

does! Thanks!

(Would be nice to include this in canopy somehow, allowing start chromium
this way.)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#276 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAsQ6YAz7l56583VBVexnT78vTnOcizeks5qVwzngaJpZM4JNEHS
.

@knocte
Copy link
Contributor Author

knocte commented Jul 15, 2016

Great thanks!

On 15 July 2016 at 12:41, Chris Holt [email protected] wrote:

I can add this tomorrow

On Jul 14, 2016 11:30 PM, "Andres G. Aragoneses" <[email protected]

wrote:

chromeDir <- "/usr/lib/chromium-browser/chromedriver"

That doesn't work. But this:

chromeDir <- "/usr/lib/chromium-browser"

does! Thanks!

(Would be nice to include this in canopy somehow, allowing start chromium
this way.)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
#276 (comment)
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AAsQ6YAz7l56583VBVexnT78vTnOcizeks5qVwzngaJpZM4JNEHS

.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#276 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAUOJ6sO3yX7v7OhnS0zoiPAvACYyb-xks5qVw9qgaJpZM4JNEHS
.

@lefthandedgoat
Copy link
Owner

lefthandedgoat commented Jul 16, 2016

You can download the latest nuget with the fix here:

https://www.nuget.org/packages/canopy/0.9.57

I didn't have a chance to test it, but it 'should work' =)

@knocte
Copy link
Contributor Author

knocte commented Aug 13, 2016

I've tried 0.9.57 today and tested this, but still doesn't work. The error is not the same as the error I posted in my first message up here, see:

Unhandled Exception:
OpenQA.Selenium.DriverServiceNotFoundException: The file /usr/bin/chromedriver does not exist. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html
  at OpenQA.Selenium.DriverService..ctor (System.String servicePath, Int32 port, System.String driverServiceExecutableName, System.Uri driverServiceDownloadUrl) <0x416d5a10 + 0x00217> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService..ctor (System.String executablePath, System.String executableFileName, Int32 port) <0x416d5880 + 0x00153> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService (System.String driverPath, System.String driverExecutableFileName) <0x416cfb20 + 0x0004b> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService (System.String driverPath) <0x416c8850 + 0x0001b> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor (System.String chromeDriverDirectory, OpenQA.Selenium.Chrome.ChromeOptions options, TimeSpan commandTimeout) <0x416c87f0 + 0x0001f> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor (System.String chromeDriverDirectory, OpenQA.Selenium.Chrome.ChromeOptions options) <0x416c8790 + 0x00037> in <filename unknown>:0 
  at canopy.core.start (canopy.BrowserStartMode b) <0x416c6c70 + 0x006c7> in <filename unknown>:0 
  at <StartupCode$UITest>.$Program.main@ () <0x41699d50 + 0x002e3> in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: OpenQA.Selenium.DriverServiceNotFoundException: The file /usr/bin/chromedriver does not exist. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html
  at OpenQA.Selenium.DriverService..ctor (System.String servicePath, Int32 port, System.String driverServiceExecutableName, System.Uri driverServiceDownloadUrl) <0x416d5a10 + 0x00217> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService..ctor (System.String executablePath, System.String executableFileName, Int32 port) <0x416d5880 + 0x00153> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService (System.String driverPath, System.String driverExecutableFileName) <0x416cfb20 + 0x0004b> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService (System.String driverPath) <0x416c8850 + 0x0001b> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor (System.String chromeDriverDirectory, OpenQA.Selenium.Chrome.ChromeOptions options, TimeSpan commandTimeout) <0x416c87f0 + 0x0001f> in <filename unknown>:0 
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor (System.String chromeDriverDirectory, OpenQA.Selenium.Chrome.ChromeOptions options) <0x416c8790 + 0x00037> in <filename unknown>:0 
  at canopy.core.start (canopy.BrowserStartMode b) <0x416c6c70 + 0x006c7> in <filename unknown>:0 
  at <StartupCode$UITest>.$Program.main@ () <0x41699d50 + 0x002e3> in <filename unknown>:0

@knocte
Copy link
Contributor Author

knocte commented Aug 13, 2016

Oh, my bad, the problem is that I was still using ChromeWithOptions, do you mind adding ChromiumWithOptions too?

@lefthandedgoat
Copy link
Owner

Sure!

@lefthandedgoat
Copy link
Owner

You can download here:

https://www.nuget.org/packages/canopy/0.9.60

You still need to pass Chrome Options as there is no Chromium options in selenium.

@knocte
Copy link
Contributor Author

knocte commented Aug 14, 2016

Cool thanks! (But did you forget to push? I was curious to look at how you added it, but can't find the change :) )

lefthandedgoat added a commit that referenced this issue Aug 14, 2016
@lefthandedgoat
Copy link
Owner

I hadn't pushed. The change is now linked below your comment.

@knocte
Copy link
Contributor Author

knocte commented Aug 14, 2016

Cool thanks! Works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants