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

Make WSL detection more generic #187

Merged
merged 1 commit into from
Dec 18, 2020
Merged

Conversation

rbclark
Copy link
Contributor

@rbclark rbclark commented Dec 17, 2020

On WSL2, the contents of /proc/version seem to have changed slightly, the command currently in webdrivers currently returns false:

irb(main):001:0> File.open('/proc/version').read.include?('Microsoft')
=> false
irb(main):002:0> File.open('/proc/version').read.downcase.include?('microsoft')
=> true

Full contents for completeness:

irb(main):003:0> File.open('/proc/version').read
=> "Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020\n"

Unfortunately this does not seem to fix all of the issues, although I am unsure if the rest of the issues are in the webdrivers gem or not. I am still receiving a Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9515 error when trying to run on WSL2 with a pretty barebones Rails system test setup.

@kapoorlakshya
Copy link
Collaborator

@rbclark Thanks for your contribution! Will try to release all the recent changes this weekend.

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

Successfully merging this pull request may close these issues.

None yet

2 participants