-
Notifications
You must be signed in to change notification settings - Fork 96
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
Do we need to move to newer capabilities settings? #467
Comments
Just noticed this from ChromeDriver when looking at #519:
So that's drivers for both Firefox and Chrome emitting warnings. I'd have to check, but the Edge driver probably does the same. But the Safari driver is a bit of an oddball, before we update, I'd have to check we aren't breaking it. |
Here's a pretty good explanation of the current syntax: w3c/webdriver#1215 (comment) If I understand correctly, we could probably auto-convert the legacy Using edn and pseudo-capabilties: {:requiredCapabilities {:some-capability :must-be-true
:some-config :here}
:desiredCapabilties {:some-other-capability :should-be-preferred}} Could become: {:capabilities
{:alwaysMatch {:some-capability :must-be-true
:some-config :here}
:firstMatch [{:some-other-capability :should-be-preferred}]} |
The current state of Etaoin is:Etaoin documents that the user can specify So Etaoin does not explicitly expose the concept of required and desired capabilities. Some thoughtsThe The capabilities spec design is a bit odd in that it mixes user-provided config with webdriver selection criteria. Etaoin is focused on the user-provided config aspect. In the near term, we can experiment with using the new format while maintaining the existing behaviour. We'll see if plunking the Etaoin user-specified Optionally, we can consider: if the user specifies |
GeckoDriver 0.35.0 was just released with the following change:
So, I'll get to this one very soon. |
Oh it looks like Etaoin is ultra-legacy here. We are expressing, for example, I did find it specifically documented via the wayback machine. So.. the new way, if I understand it, is vendor-specific. |
Ok, moving to the new capabilities syntax puts chromedriver in a different mode. After too much poking around, my initial theory is that W3C mode could maybe be thought of as non-legacy-api-mode. Google documents its chromedriver API at the Selenium level, which is not terribly helpful to us. |
Oh, here's maybe it: The chromedriver "W3C mode" probably is a badly named replacement for the old JSON Wire Protocol. Maybe. |
Sooo... my guess for the chromedriver |
Ok, we need a breaking change to move to the w3 spec. The w3c spec implements keyboard and mouse interaction through "actions". But Etaoin also exposes (all chrome specific unless otherwise noted)
These features cannot be migrated as is to WebDriver actions because, in the W3C spec "actions" world, they represent individual steps in a transaction and, as such, do not work well if sent to the WebDriver independently. They will be deleted. |
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 the `firstMatch` vector. This should match existing behaviour. Moving to the new capabilities syntax tells `chromedriver` (and `msedgedriver`) 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: - Our recent deletion of PhantomJS support allowed me to streamline many `defmulti`s into `defn`s. - Added links to W3C WebDriver Spec endpoints to docstrings 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: - Uncomment and fix the maximize test - Screenshots on elements work on safari, enable them - Added notes on displayedness to docstrings - Remove internal support for undocumented `: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 tests New 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.
* Move to w3c WebDriver spec 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 the `firstMatch` vector. This should match existing behaviour. Moving to the new capabilities syntax tells `chromedriver` (and `msedgedriver`) 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: - Our recent deletion of PhantomJS support allowed me to streamline many `defmulti`s into `defn`s. - Added links to W3C WebDriver Spec endpoints to docstrings 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: - Uncomment and fix the maximize test - Screenshots on elements work on safari, enable them - Added notes on displayedness to docstrings - Remove internal support for undocumented `: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 tests New 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. * address lint error * test: capabilities: \ path separators on win
Currently
While taking a peek a WebDriver logs, I noticed firefox's geckodriver emitting:
So maybe...
We should have a look-see and see if we should be specifying capabilities in a different way these days.
Action
I'll eventually follow up.
The text was updated successfully, but these errors were encountered: