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

Browser binary path is not shell escaped when custom Chrome.path is used #52

Closed
ochko opened this issue Mar 29, 2019 · 0 comments · Fixed by #53
Closed

Browser binary path is not shell escaped when custom Chrome.path is used #52

ochko opened this issue Mar 29, 2019 · 0 comments · Fixed by #53

Comments

@ochko
Copy link
Contributor

ochko commented Mar 29, 2019

There is a google chrome app at custom location.

chrome_path = '/Users/CI/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
Selenium::WebDriver::Chrome.path = chrome_path

⬇️

DEBUG Webdrivers Browser executable: '/Users/CI/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
rails_test: No such file or directory - /Users/CI/Applications/Google

If I do shell escaping:

chrome_path = '/Users/CI/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
Selenium::WebDriver::Chrome.path = Shellwords.escape(chrome_path)

⬇️ This time selenium-webdriver gives an error:

selenium-webdriver-3.141.0/lib/selenium/webdriver/common/platform.rb:128:
in `assert_file': not a file: "/Users/CI/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome" (Selenium::WebDriver::Error::WebDriverError)
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 a pull request may close this issue.

1 participant