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

Configurable webdriver (gecko by default but now chrome can be chosen) #70

Merged
merged 2 commits into from
Apr 26, 2020

Conversation

nahuelhds
Copy link
Contributor

I've added the chromedriver configurable with the config.yaml file.

You can configure this in the config.yaml. The keys are the following ones.

webdriver:
  engine:
  executable_path:
  binary_location:

Geckodriver

The geckodriver is properly defined by default. In case you need to configure it, then:

webdriver:
  engine: "geckodriver"
  executable_path: null (this config has no use with geckodriver)
  binary_location: null (the same as above with this one)

Chromedriver

If you want to use chromedriver locally, then you should leave the config this way:

webdriver:
  engine: "chromedriver"
  executable_path: null ("chromedriver" by default)
  binary_location: null ("" by default)

Using chromedriver in Heroku

If you use Heroku, then you have to add the Heroku chromedriver buildpack.
And then use the environment vars provided automatically by it.

webdriver:
  engine: "chromedriver"
  executable_path: "${CHROMEDRIVER_PATH}"
  binary_location: "${GOOGLE_CHROME_BIN}"

This is added in the readme

Nahuel Sotelo added 2 commits April 26, 2020 17:02
…w you can choose chromedriver as well. Useful for working with Heroku
@edsu edsu merged commit 4cfe586 into DocNow:master Apr 26, 2020
@edsu
Copy link
Member

edsu commented Apr 26, 2020

Awesome! I tweaked the .travis.yml to hopefully get chromedriver installed on there so the test will pass.

@edsu
Copy link
Member

edsu commented Apr 26, 2020

There does seem to be a mismatch on Travis unfortunately. I will see if i can track it down, or disable to the test on Travis if I cant.

self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f406e931cf8>

response = {'status': 500, 'value': '{"value":{"error":"session not created","message":"session not created: This version of ChromeDriver only supports Chrome version 80","stacktrace":"#0 0x558ae4d37e89 \\u003Cunknown>\\n"}}'}

@nahuelhds
Copy link
Contributor Author

Ok. Let me know. Maybe I can help you with the debugging

@nahuelhds nahuelhds deleted the feature/configurable-webdriver branch April 27, 2020 00:36
@nahuelhds nahuelhds restored the feature/configurable-webdriver branch April 27, 2020 00:36
@nahuelhds nahuelhds deleted the feature/configurable-webdriver branch April 27, 2020 00:37
@nahuelhds
Copy link
Contributor Author

Hi @edsu I've seen you struggling with Chrome driver in Travis.

First of all, I see you could use the addon key as says the docs

addons:
  chrome: stable

If that doesn't work, then I think this could solve the issue as well. In this case, something like the following as we need Chrome v80

wget https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
./chromedriver

I don't know if this could be done directly on Travis.

Hope it helps.

@edsu
Copy link
Member

edsu commented Apr 27, 2020

It does help, thanks @nahuelhds -- I'll try those ideas out.

@edsu
Copy link
Member

edsu commented Apr 27, 2020

Bingo! addon works!

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.

2 participants