selenium: [π Bug]: can not launch geckodriver.exe under cygwin environment
What happened?
Under Cygwin environment using selenium-webdriver version 11.4? I got the error :
/home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/child_process.rb:57:in `spawnβ: No such file or directory - D:\cygwin64_latest\cygwin64\usr\local\bin\geckodriver.exe (Errno::ENOENT)
I use this workaround to resolve the issue. In selenium-webdriver-4.11.0/lib/selenium/webdriver/common/service.rb file, I replace @executable_path = path by @executable_path = β/usr/local/bin/geckodriver.exeβ in initialize method.
How can we reproduce the issue?
require 'watir'
Watir::Browser.new :firefox
Relevant log output
/home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/child_process.rb:57:in `spawn': No such file or directory - D:\cygwin64_latest\cygwin64\usr\local\bin\geckodriver.exe (Errn
o::ENOENT)
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/child_process.rb:57:in `start'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/service_manager.rb:104:in `start_process'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/service_manager.rb:57:in `block in start'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/socket_lock.rb:42:in `locked'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/service_manager.rb:55:in `start'
from <internal:kernel>:90:in `tap'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/service.rb:91:in `launch'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/driver.rb:334:in `service_url'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/local_driver.rb:28:in `initialize_local_driver'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/firefox/driver.rb:42:in `initialize'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/driver.rb:53:in `new'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/driver.rb:53:in `for'
from /home/mcheav/.gem/ruby/3.2.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver.rb:88:in `for'
from /home/mcheav/.gem/ruby/3.2.0/gems/watir-7.3.0/lib/watir/browser.rb:46:in `initialize'
Operating System
Cygwin
Selenium version
Ruby 4.11.0
What are the browser(s) and version(s) where you see this issue?
Firefox 116.0.3 (64 bits)
What are the browser driver(s) and version(s) where you see this issue?
geckodriver 0.33.0
Are you using Selenium Grid?
No response
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 19 (14 by maintainers)
Commits related to this issue
- [rb] convert binary locations for cygwin fixes #12618 — committed to RevealOscar/selenium by titusfortner 7 months ago
@titusfortner I think we can just check if itβs
Platform.cygwin?and then usePlatform.cygiwn_pathto preform the conversion?https://github.com/SeleniumHQ/selenium/blob/8640ea8ae5731639e22272e6989648aff2c98e16/rb/lib/selenium/webdriver/common/platform.rb#L110-L115