Closed
Conversation
6a02b11 to
7f36a17
Compare
Contributor
|
This all sounds fine to me other than the deprecating of the Selenium::WebDriver namespace - that's going to make exception handling while supporting selenium-webdriver 3 and 4 in Capybara a pain |
Member
Author
Fair enough. We might just not do that or find a way to make it work for Capybara painlessly. @titusfortner proposed this, so maybe he has an opinion on that. |
p0deje
added a commit
that referenced
this pull request
Sep 28, 2018
It will be removed in Selenium 4. Use PortProber.above(port) instead. Related to #6444
cbd9785 to
ddeb4bb
Compare
0f1522a to
e5734e0
Compare
10 tasks
6c6b00d to
b1a8627
Compare
Contributor
|
@p0deje for when you move / CP the commits into here I've tackled the following.
|
d228f6f to
7e91f8b
Compare
31cd801 to
6b67335
Compare
This commit marks the end of old JSON Wire Protocol dialect support. It is replaced by W3C dialect described by WebDriver specification. We used to support both dialects by figuring out which one to use dynamically (so-called "protocol handshake"), but Selenium 4 only supports W3C specification. Things mostly work fine, though bugs are expected at the edges since this commit includes major changes. Please note that certain drivers don't properly support W3C yet. The current state is the following: * Firefox works fine via GeckoDriver * Chrome works (mostly) fine via ChromeDriver with W3C mode turned on * IE works fine via IEDriverServer * Safari works fine via SafariDriver * Edge doesn't work since it responds with OSS dialect * PhantomJS doesn't work since it has always spoken only OSS dialect * Remote equivalents, when used via Selenium server, work similarly to the described above. OSS dialect: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol. W3C dialect: https://w3c.github.io/webdriver.
It has been deprecated since Selenium 3.6 and is not W3C specification compliant.
Selenium 4 only supports W3C dialect, so legacy Firefox driver should be gone.
This commit is a part of a broader initiative to remove OSS dialect. In theory, all the drivers will comply to W3C WebDriver specification and support the implementation.
As a part of initiative to remove OSS dialect and support only W3C, all the errors not compliant to specification were removed. It seems like server/grid passes through all the errors from drivers without altering them (with the only exception of custom error when trying to upload multiple files to server using POST /se/file - it's handled just fine by Ruby bindings).
This was only directly called in the HasTouchScreen DriverExtension in 1 instantiation; and as such isn't used that much across the suite Integration tests that relied on Double Forms of this class have just been modified to use the string representation Signed-off-by: Alex Rodionov <p0deje@gmail.com>
…s of chromedriver Signed-off-by: Alex Rodionov <p0deje@gmail.com>
Member
Author
|
This is now in master, so no need to maintain PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is opened for the list of changes I'd like to do for Ruby bindings in Selenium 4. Please read below for details and I'll be happy to hear the feedback. Let's have this PR both as To Do list and discussion board + code of what we want to see in Selenium 4. I'll be updating the list throughout the implementation and discussion.
I'll be very happy to hear the feedback from everyone else involved in selenium-webdriver gem development (@titusfortner, @lmtierney, @twalpole). If something is not clear or doesn't make any sense or causes trouble for higher-level libraries (Watir, Capybara) - let's discuss here.
Removal of OSS dialect
Mouseclass.Keyboardclass.W3CSometimgclasses toSomething. Remove their OSS equivalents.desired_capabilitiestocapabilitiesand provide W3C-compliant API for setting then (alwaysMatch,firstMatch).Cleanup
Improvements
Safari::Options(added in 96998d9).Edge::Options(added in 4b0296f).Optionsclasses to remote instances (added in 92f4ed8).Serviceinstances to driver in favor ofdriver_opts. Deprecatedriver_opts.UseThis is postponed until Se5.element/{element id}/attribute/{name}to get element instead of atom (confirm with Simon).Ruby-specific
DeprecateAgree not to do this.Selenium::WebDrivernamespace in favor ofSelenium.C-rbissues (somehow).C-rbpull requests (somehow).SocketPoller#listening?as the bug it works around has been fixed in JRuby 1.6.7 (http://jruby.org/2012/02/22/jruby-1-6-7).RUBY_ENGINEas it was only undefined in MRI 1.8 (also search for similar constants).Platform#null_deviceasFile::NULLwas introduced in Ruby 1.9.3 (https://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_0/NEWS).$PROGRAM_NAME == __FILE__- use IRB instead.File::ALT_SEPARATORwhenever possible.Logger.PortProber.randomas it should be avoided (deprecated in 6d3edb5).Waitto useProcess::CLOCK_MONOTONICinstead ofTimeas the latter is often monkey-patched (e.g. Timecop).Deprecate and extract all custom HTTP clients (curb/persistent)Postponed.&.)Safari::Service#binary_pathThis change is