-
Notifications
You must be signed in to change notification settings - Fork 110
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
[3.7.0] Doesn't work with chromium on Linux #38
Comments
Hi @boris-petrov, thanks for reporting this. I'll try to add support for |
I'll need to discuss this with @titusfortner before implementing it, but I think a flag like this would fit your use case: Webdrivers::Chromedriver.use_chromium = true The other option is to check for what is installed and use it to retrieve the version. However, that won't work well if you have both |
Well, the best user-experience would be to check for |
Ah, I knew I overlooked something. We should be pulling from Users can have multiple installations of chrome, and that's the best place to specify. We should also probably be using the same code as selenium for locating the default path rather than specifying it. |
@boris-petrov Which distro and version of Chromium are you using? I checked on CentOS 7.6 and Ubuntu 14.04, and the installed executable is named @titusfortner That makes sense. So if I understand correctly, this would be the ideal approach then:
I am okay with skipping check 3 and including a note in the README for Chromium users. |
@kapoorlakshya - Arch Linux, latest Chromium - 73.0.3683.86. The executable is |
@boris-petrov Thanks! I'm glad it won't be a problem as Titus's recommendation will allow us to work around this difference :) |
Released v3.7.1. Please let me know if you run into any other issues. |
@kapoorlakshya - well, 3.7.1 still doesn't work for me. :) |
@boris-petrov You should set EDIT: Wrap path in single quotes. |
@kapoorlakshya - I see, but why does Capybara/Selenium work even without this? How does it find the correct Chrome to use and why can't |
@boris-petrov From what I know, this is where Selenium looks for the Chrome binary:
P.S. If you're curious how Chrome itself does it, you can read through the code here. |
@kapoorlakshya Thanks for the answer. I will use |
Capybara doesn't do any location of the executable - that is all done by selenium unless you've overridden it in your capybara driver registration. |
@kapoorlakshya, @twalpole - the funny thing is that we have nothing in our configuration and our setup works fine on my machine (Arch Linux, |
I think Issue #45 is what we probably need to implement for it to do what you want. |
Could anyone hold my hand and tell me where exactly https://github.com/RyanTG/pbm/blob/master/spec/spec_helper.rb and when using webdrivers, should I remove |
@RyanTG Please share the exact error.
Please note that it's |
@RyanTG - it should be |
@boris-petrov Good catch! |
Thanks! The error is
Line 32 is where the I'm trying to set the path. I've tried putting it in lots of places in spec_helper.
|
|
Oh jeez. I really should have been pasting from the readme, and not #38 (comment) Works now - thanks for your help! And this confirmed that the tests that are failing on headless in linux, but not chrome in linux and not headless or chrome on mac are still failing even after switching to webdrivers (which was a long shot, but I'm grasping at straws here). |
Oops... updated my comment. Good luck with your test! |
@RyanTG It was unlikely switching from chromedriver-helper to webdrivers would fix any issue -- it all ends up running the same things. For issues with headless in linux have you tried adding the |
I hadn't. But I tried it just now, and it didn't improve my situation. Thanks for that tip, though. My test involves clicking a button that expands a div to load a select. Then choosing an item from the select. With |
@RyanTG It's highly unlikely to have anything to do with Postgresql or ruby itself. Assuming you're running current versions of chromium It's going to be something to do with a setting for the browser - for instance you're only setting a window size in headless mode -- try setting headless and headful to the same window size and see if the problem goes away/exists on both, or why are you disabling the GPU (that's only needed on windows). Also use |
Another option if you're on Linux is to use the headless gem instead of the browser's headless mode |
I guess the issue is here. This checks for
google-chrome
while I, for example, usechromium
. The code should be made to handle that scenario.The text was updated successfully, but these errors were encountered: