Closed odedniv closed 5 years ago
Agree with your points about phantom being deprecated. It's been on my list of things to get to -- I would accept a PR that effectively removes phantomjs and makes the chrome driver primary, otherwise I'd rather wait to pull this in to avoid two passes at trying to resolve this.
Is the way I passed the options reasonable? If so I don't see why this PR cannot be merged regardless of changing the default.
I'm assuming you refer to the docs and the generator? Or do you want to remove support? That would be a hurtful breaking change (that may delay this little change unnecessarily)
If you'd lay out exactly what you want done (e.g. do you want to change the default to what I wrote above? do you want to add documentation in the wiki and the generator? etc) I'd be happy to push a PR (though I don't know where the wiki is or the generator).
@jejacks0n There's a few other PRs to do the same thing (https://github.com/jejacks0n/teaspoon/pull/519, https://github.com/jejacks0n/teaspoon/pull/530), perhaps there's enough demand to merge (one of) this change on its own?
Is there any movement on this? I am looking at migrating off phantomjs onto headless chrome but obviously need this change in.
@josh08h until the maintainer gets a chance to work on it, you can use the branch directly (I have ever since I opened this PR). In your Gemfile:
gem 'teaspoon', github: 'odedniv/teaspoon', branch: 'selenium-options'
You can fork and use your own branch if you're intimidated by doing that.
The only problem I had with using Chrome is that console.log
no longer appears in the terminal, I have to stop using headless
mode and open the inspect element window to see them.
Thanks for the heads up re console.log
.
Your patch looks good to me - I'll most likely fork off your branch.
If y’all can figure out why console log doesn’t work I’ll merge this.
@jejacks0n I think it's still better than using a deprecated driver :) Also this PR doesn't break anything, it just allows additional driver options (whatever driver you happen to use)
@odedniv and @jejacks0n Thanks for the work on this! I would love to see this merged in. We are using headless FF in our CI environment for our ruby based feature specs. And I want to ditch PhantomJS and use headless FF for teaspoon, too. Is there something holding this back that I could help with? Thanks!
@pjmelling would you be willing to sort out CI? IT's pretty hard to merge when CI is broken and I simply haven't had time to work on open source much in the past year or two.
https://github.com/jejacks0n/teaspoon/pull/552 fixes the build. Perhaps we can proceed to merge this? :-) /cc @odedniv @jejacks0n
I’m mobile, anybody want to rebase and check things?
Done, seem to work
Oops, if anyone was using my PR branch (including me), your Gemfile.lock
is now broken (fatal: Could not parse object 'f64781ee6097e18fb838bc4fd5725172e3a24d27'
).
Run bundle update --source teaspoon
to fix
Chrome now allows headless capability, but teaspoon stood between my app and the ability to use it. Here's the fix, and this is how I use it in my
spec/teaspoon_env.rb
(I recommend adding it to the wiki):To my understanding PhantomJS ceased development because of overwhelming security issues, and the fact it can be replaced by Chrome's headless capability. I think it's time to replace it with Selenium as the default driver.