Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

get it to work with chrome #2

Open
catmando opened this issue Oct 12, 2017 · 8 comments
Open

get it to work with chrome #2

catmando opened this issue Oct 12, 2017 · 8 comments

Comments

@catmando
Copy link
Contributor

latest chrome driver fixes previous issue that was preventing chrome driver from working with Opal.

Here is some info on Stack Overflow regarding getting chrome driver settings sent over from rspec:

https://stackoverflow.com/questions/36407099/sending-capabilities-switches-to-chromedriver-with-capybara/46261462#46261462

@sfcgeorge
Copy link

I don't know what switches you need to set on Chrome, but Chrome in headless mode ignores some of them. Command line flags work, but prefs / profile don't.

This is only an issue when used with the --headless flag, so we can still use Chrome instead of Firefox but without the advantages of being headless.

https://bugs.chromium.org/p/chromedriver/issues/detail?id=1925
SeleniumHQ/selenium#4437

@catmando catmando added this to the Release 0.15 milestone Nov 15, 2017
@catmando
Copy link
Contributor Author

We should make sure it works head and headless

@janbiedermann
Copy link
Contributor

done in sachsenring, yet these headless drivers all suck, sometimes tests run, sometimes not, can depend on subtle version differences.

@catmando
Copy link
Contributor Author

then it ain't working :-)

@janbiedermann
Copy link
Contributor

janbiedermann commented Nov 23, 2017

The fix would then be documentation:

  1. Use the latest driver available
  2. if the last installed version doesnt work, try the next earlier one
  3. repeat two until you got it working or no more version is available

Thing is, because the drivers are external programs following their manufacturers release policies, we cant lock a version in the Gemfile. For chrome headless users usually get the latest, which is not always the greatest, same for geckodriver.

Very important here to add for users:
Do not reference circular objects!

Meaning: Do not test for "MyModel", but instead call a method that returns a value, any will do then, for example: "MyModel.respond_to?('find')"

@sfcgeorge
Copy link

Chrome Headless works for me, issue can be closed?

@janbiedermann
Copy link
Contributor

almost, still issues with the hyper-gems tests

@janbiedermann
Copy link
Contributor

janbiedermann commented Jan 22, 2018

currently no more issues with tests with the gems, though using any has_xpath or has_css is completely unreliable. workaround expect(page.body).to match(/<div>/) or .to include('<div>')
Leaving this open for documentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants