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.
We've been using a
capabilities
syntax for create session that has long been deprecated. Firefox finally forced our hand with geckodriver 0.35.0, which has removed support for the obsolete syntax.All supported WebDrivers understand the newer syntax.
We used to pass capabilities in as
desiredCapabilities
, we now pass them in as a single item in thefirstMatch
vector. This should match existing behaviour.Moving to the new capabilities syntax tells
chromedriver
(andmsedgedriver
) that we are running in "w3c mode". This has benefits on Etaoin code. Our many customizations for these WebDrivers are no longer necessary, they now support the W3C WebDriver endpoint spec.In "w3c mode", chromedriver disallows any endpoints that could be served by W3C WebDriver endpoints.
Notable examples are mouse and touch operations. These are now handled by the W3C WebDriver action endpoints. WebDriver actions are not stand-alone, they are submitted as transaction of steps. As such the following Chrome-specific fns are no longer needed and would be confusing if not deleted:
mouse-btn-down
mouse-btn-up
with-mouse-btn
mouse-move-to
(was also available in Firefox)mouse-click
right-click
left-click
touch-down
touch-move
touch-up
Users will instead express these manipulations via the existing
perform-actions
.Fns that represent a transaction of actions in themselves remain:
drag-and-drop
(from element to element)double-click*
(on an element)*-click-on
(on an element)touch-tap
(on an element)Verifying that everything worked required a full review of the API.
Some sweeping changes:
defmulti
s intodefn
s.Added some fns to expose at the W3C WebDriver Spec granularity:
get-timeouts
set-timeouts
get-element-rect
get-element-rect-el
get-element-rect
set-window-rect
get-window-rect
We have finer grained versions of the above (ex.
get-element-position
,get-element-size
, etc). We've kept these for backwards compatibility, but if we were starting today, we would have just matched today's W3C WebDriver spec.Minor fixes/changes:
:desired-capabilities
, the implementation was either ultra legacy or misunderstood legacy APIs.Add
bb test-coverage
task to check what we are not covering with testsNew tests include coverage for:
back
forward
set-cookie
release-actions
*-timeout*
double-click
Closes #467
Incidentally closes #522 via better docstrings on getting properties.
Closes #484 with W3C WebDriver spec endpoint links.
Please complete and include the following checklist:
I have read CONTRIBUTING and the Etaoin Developer Guide.
This PR corresponds to an issue that the Etaoin maintainers have agreed to address.
This PR contains test(s) to protect against future regressions
I have updated CHANGELOG.adoc with a description of the addressed issue.