Closed Bug 1502864 Opened 6 years ago Closed 6 years ago

Relax interactability test on <input type=file> and implement strictFileInteractability capability

Categories

(Remote Protocol :: Marionette, enhancement, P1)

enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: ato, Assigned: ato)

References

(Blocks 1 open bug, )

Details

Attachments

(16 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
2.50 KB, patch
Details | Diff | Splinter Review
3.10 KB, patch
Details | Diff | Splinter Review
3.28 KB, patch
Details | Diff | Splinter Review
1.47 KB, patch
Details | Diff | Splinter Review
3.37 KB, patch
Details | Diff | Splinter Review
2.75 KB, patch
Details | Diff | Splinter Review
10.73 KB, patch
Details | Diff | Splinter Review
4.92 KB, patch
Details | Diff | Splinter Review
It was decided at TPAC in Lyon [1] that we should relax the keyboard
interactability checks on <input type=file> so that we for a
transition period always treat it as interactable.  This will give
us compatibility with Chrome.

Related spec changes: https://github.com/w3c/webdriver/pull/1325

  [1] https://www.w3.org/2018/10/26-webdriver-minutes.html
See also the geckodriver bug on this:
https://github.com/mozilla/geckodriver/issues/1173
Blocks: webdriver
Priority: -- → P2
Assignee: nobody → ato
Status: NEW → ASSIGNED
Priority: P2 → P1
Normally all interactability tests are centralised in interactability.py,
but the WebDriver standard recently changed to apply a special
set of interactability checks specifically for <input type=file>.
These tests ensure the special code paths are invoked for form controls.
The WebDriver standard changed
in https://github.com/w3c/webdriver/pull/1325 to align with
chromedriver's behaviour of permitting interaction with hidden
<input type=file> elements.

DOM elements can be hidden, i.e. not rendered, in two ways: through
applying the "hidden" DOM attribute or by setting the "display:
none" CSS style.

Depends on D10269
The new strictFileInteractabilityTests capability takes a boolean and
can unconditionally be set to both true and false.  It is permitted
to be undefined.

Depends on D10270
The strictFileInteractability capability is always supported by
geckodriver.

Depends on D10273
This patch changes Marionette to only run the interactability test
on <input type=file> when the strictFileInteractability capability is set.

strictFileInteractability is not set by default which means
this changes WebDriver:SendElementKeys' behaviour to not run
interactability checks on <input type=file>.  This aligns our
WebDriver implementation with the current behaviour in Chrome.

To make it legible what the input to interaction.sendKeysToElement
is, its API has changed to take an options dictionary instead of
three boolean arguments at the end.

Depends on D10274
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7616e25a07b3
webdriver: add tests for keyboard interactability for <input type=file>; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/9caa2f0e2e38
webdriver: add tests for hidden <input type=file>; r=jgraham,whimboo
https://hg.mozilla.org/integration/autoland/rev/0b421dd8a7d5
webdriver: add strictFileInteractability capability tests; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/2fda41394085
webdriver: sort invalid_extensions list; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/1eb51f6b4ba0
webdriver: add strictFileInteractability capability; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/9382a6630231
geckodriver: support strictFileInteractability; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/3f7ca511af8c
marionette: support strictFileInteractability; r=whimboo
https://hg.mozilla.org/integration/autoland/rev/6e4454a6f3ee
marionette: enable strict file interactability in Python client; r=whimboo
Blocks: 1504253
Backout by aciure@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/430a62a41084
Backed out 8 changesets for failing test_capabilities.py CLOSED TREE
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/13885 for changes under testing/web-platform/tests
The test failure was caused by a faulty rebase by Lando.
Flags: needinfo?(ato)
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/301c1d1d5e14
webdriver: add tests for keyboard interactability for <input type=file>; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/6fb763dc8e9b
webdriver: add tests for hidden <input type=file>; r=jgraham,whimboo
https://hg.mozilla.org/integration/autoland/rev/dc69c736701f
webdriver: add strictFileInteractability capability tests; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/7a89ca7dca2d
webdriver: sort invalid_extensions list; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/a46ac8b5864d
webdriver: add strictFileInteractability capability; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/5dfaec47ee3f
geckodriver: support strictFileInteractability; r=jgraham
https://hg.mozilla.org/integration/autoland/rev/fcbcfe24b192
marionette: support strictFileInteractability; r=whimboo
https://hg.mozilla.org/integration/autoland/rev/c2c30e650d69
marionette: enable strict file interactability in Python client; r=whimboo
Upstream PR was closed without merging
Andreas, I would say this bug is important enough to get uplifted to beta. What do you think?
Flags: needinfo?(ato)
Also we may want to release a new geckodriver release (bug 1495062).
Blocks: 1495062
Normally all interactability tests are centralised in interactability.py,
but the WebDriver standard recently changed to apply a special
set of interactability checks specifically for <input type=file>.
These tests ensure the special code paths are invoked for form controls.

Differential Revision: https://phabricator.services.mozilla.com/D10269
The WebDriver standard changed
in https://github.com/w3c/webdriver/pull/1325 to align with
chromedriver's behaviour of permitting interaction with hidden
<input type=file> elements.

DOM elements can be hidden, i.e. not rendered, in two ways: through
applying the "hidden" DOM attribute or by setting the "display:
none" CSS style.

Depends on D10269

Depends on D10269

Differential Revision: https://phabricator.services.mozilla.com/D10270
The new strictFileInteractabilityTests capability takes a boolean and
can unconditionally be set to both true and false.  It is permitted
to be undefined.

Depends on D10270

Depends on D10270

Differential Revision: https://phabricator.services.mozilla.com/D10271
Depends on D10271

Depends on D10271

Differential Revision: https://phabricator.services.mozilla.com/D10272
The strictFileInteractability capability is always supported by
geckodriver.

Depends on D10273

Depends on D10273

Differential Revision: https://phabricator.services.mozilla.com/D10274
This patch changes Marionette to only run the interactability test
on <input type=file> when the strictFileInteractability capability is set.

strictFileInteractability is not set by default which means
this changes WebDriver:SendElementKeys' behaviour to not run
interactability checks on <input type=file>.  This aligns our
WebDriver implementation with the current behaviour in Chrome.

To make it legible what the input to interaction.sendKeysToElement
is, its API has changed to take an options dictionary instead of
three boolean arguments at the end.

Depends on D10274

Depends on D10274

Differential Revision: https://phabricator.services.mozilla.com/D10275
(In reply to Henrik Skupin (:whimboo) from comment #20)

> Andreas, I would say this bug is important enough to get uplifted
> to beta.  What do you think?

I would agree with you.

I hit some conflicts when rebasing it onto beta, but
tried resolving the conflicts.  There’s a try run here:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d0ae66748bbfe42860d5cc1deffeab1bf405cb8d
Flags: needinfo?(ato)
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: