Closed Bug 1245064 Opened 10 years ago Closed 10 years ago

Implement element interactability algorithm from WebDriver

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox47 fixed, firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox47 --- fixed
firefox48 --- fixed

People

(Reporter: ato, Assigned: ato)

References

(Blocks 1 open bug)

Details

(Keywords: pi-marionette-server)

Attachments

(6 files, 4 obsolete files)

58 bytes, text/x-review-board-request
automatedtester
: review+
Details
58 bytes, text/x-review-board-request
automatedtester
: review+
Details
58 bytes, text/x-review-board-request
automatedtester
: review+
Details
58 bytes, text/x-review-board-request
automatedtester
: review+
Details
58 bytes, text/x-review-board-request
automatedtester
: review+
Details
58 bytes, text/x-review-board-request
automatedtester
: review+
Details
Now that bug 1164427 has landed, it is possible for us to implement the element interactability concept from the W3C WebDriver specification: http://w3c.github.io/webdriver/webdriver-spec.html#element-interactability Although it has not yet been verified if this approach is backwards compatible with the existing algorithm, it would eventually allow us to move off the dependency of an additional Selenium atom.
Blocks: webdriver
Depends on: 1164427
Implements the WebDriver pointer-interactability algorithm described in http://w3c.github.io/webdriver/webdriver-spec.html#dfn-interactable-element. The specification compatible behaviour is enabled only when the client requests the capability specificationLevel >= 0. Review commit: https://reviewboard.mozilla.org/r/38249/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/38249/
Attachment #8726835 - Flags: review?(dburns)
Marionette is not yet compatible with the WebDriver specification, and we indicate this by lowering the specificationLevel capability to 0. This lets us "gate" specification-compatible features, such as the new element interactability algorithm. The new interactability algorithm can be enabled by requesting the capability specificationLevel 1. Review commit: https://reviewboard.mozilla.org/r/38253/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/38253/
Attachment #8726837 - Flags: review?(dburns)
Assignee: nobody → ato
Status: NEW → ASSIGNED
Comment on attachment 8726835 [details] MozReview Request: Bug 1245064 - Implement element pointer-interactability; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38249/diff/1-2/
Comment on attachment 8726837 [details] MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38253/diff/1-2/
Comment on attachment 8726838 [details] MozReview Request: Bug 1245064 - Pass all capabilities to listener; r?automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38255/diff/1-2/
Comment on attachment 8726839 [details] MozReview Request: Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r?automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38257/diff/1-2/
Comment on attachment 8726840 [details] MozReview Request: Bug 1245064 - Run click tests with new interactability algorithm; r?automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38259/diff/1-2/
Attachment #8726836 - Attachment is obsolete: true
Attachment #8726836 - Flags: review?(dburns)
Attachment #8726834 - Flags: review?(dburns)
Comment on attachment 8726834 [details] MozReview Request: Bug 1245064 - Refactor interaction- and accessibility API; r=automatedtester https://reviewboard.mozilla.org/r/38247/#review35171 ::: testing/marionette/accessibility.js:309 (Diff revision 1) > + let explorable = win.getComputedStyle(element) it feels like automatic semicolon injection would make the `getPropertyValue(...)` not get called.
https://reviewboard.mozilla.org/r/38247/#review35171 > it feels like automatic semicolon injection would make the `getPropertyValue(...)` not get called. What is “automatic semicolon injection”?
https://reviewboard.mozilla.org/r/38247/#review35171 > What is “automatic semicolon injection”? in JS if you had ``` return a + b ``` The JS Compiler would change it to ``` return; a + b; ``` Because it wants to be "helpful". There are rules where it doesnt automatically insert so I am open to correction.
https://reviewboard.mozilla.org/r/38247/#review35171 > in JS if you had > > ``` > return > a + b > ``` > > The JS Compiler would change it to > > ``` > return; > a + b; > ``` > > Because it wants to be "helpful". There are rules where it doesnt automatically insert so I am open to correction. How does that affect this statement?
https://reviewboard.mozilla.org/r/38247/#review35171 > How does that affect this statement? I was wondering if ``` let explorable = win.getComputedStyle(element) .getPropertyValue("pointer-events") !== "none"; ``` results in ``` let explorable = win.getComputedStyle(element); .getPropertyValue("pointer-events") !== "none"; ```
https://reviewboard.mozilla.org/r/38247/#review35171 > I was wondering if > > ``` > let explorable = win.getComputedStyle(element) > .getPropertyValue("pointer-events") !== "none"; > ``` > > results in > ``` > let explorable = win.getComputedStyle(element); > .getPropertyValue("pointer-events") !== "none"; > ``` I think it maybe be specific to the return statement, because JS is otherwise uses C-like syntax where semicolons denote the end of an expression. ``` » a = {b: 0} ← Object { b: 0 } » c = a » .b; ← 0 ```
Comment on attachment 8726835 [details] MozReview Request: Bug 1245064 - Implement element pointer-interactability; r=automatedtester https://reviewboard.mozilla.org/r/38249/#review35341 ::: testing/marionette/element.js:883 (Diff revision 2) > + // TODO I know in the spec we use this to return early but step 7 handles this for us already. If its not in the same document then we return `[]` as per CSSOM.
Attachment #8726835 - Flags: review?(dburns) → review+
Comment on attachment 8726834 [details] MozReview Request: Bug 1245064 - Refactor interaction- and accessibility API; r=automatedtester https://reviewboard.mozilla.org/r/38247/#review35345
Attachment #8726834 - Flags: review+
Comment on attachment 8726837 [details] MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r=automatedtester https://reviewboard.mozilla.org/r/38253/#review35349
Attachment #8726837 - Flags: review?(dburns) → review+
Comment on attachment 8726838 [details] MozReview Request: Bug 1245064 - Pass all capabilities to listener; r?automatedtester https://reviewboard.mozilla.org/r/38255/#review35351
Attachment #8726838 - Flags: review?(dburns) → review+
Comment on attachment 8726839 [details] MozReview Request: Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r?automatedtester https://reviewboard.mozilla.org/r/38257/#review35353 ::: testing/marionette/driver.js:645 (Diff revision 2) > - if (Object.keys(errors).length === 0) { > + if (Object.keys(errors).length == 0) { TIL: Linters prefer `==` for length conditionals
Attachment #8726839 - Flags: review?(dburns) → review+
Comment on attachment 8726840 [details] MozReview Request: Bug 1245064 - Run click tests with new interactability algorithm; r?automatedtester https://reviewboard.mozilla.org/r/38259/#review35359 ::: testing/marionette/harness/marionette/tests/unit/test_click.py:64 (Diff revision 2) > + TestLegacyClick.test_clicking_an_element_that_is_not_displayed_raises(self) Add a `pass` statement please
Attachment #8726840 - Flags: review?(dburns) → review+
https://reviewboard.mozilla.org/r/38249/#review35341 > I know in the spec we use this to return early but step 7 handles this for us already. If its not in the same document then we return `[]` as per CSSOM. The more I think about this, the more I don't think we really need anything. Since we have the element we have already checked in it is in the DOM and is not stale. If it is not in the `document` then we can return []. If the element is good then carry on through the steps. This is just me putting my thoughts down more than anything else.
Comment on attachment 8726834 [details] MozReview Request: Bug 1245064 - Refactor interaction- and accessibility API; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38247/diff/1-2/
Comment on attachment 8726835 [details] MozReview Request: Bug 1245064 - Implement element pointer-interactability; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38249/diff/2-3/
Attachment #8726835 - Attachment description: MozReview Request: Bug 1245064 - Implement element pointer-interactability; r?automatedtester → MozReview Request: Bug 1245064 - Drop the window argument for element.isVisible; r?automatedtester
Comment on attachment 8726837 [details] MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38253/diff/2-3/
Attachment #8726837 - Attachment description: MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r?automatedtester → MozReview Request: Bug 1245064 - Reuse element.isXULElement; r?automatedtester
Attachment #8726838 - Attachment is obsolete: true
Attachment #8726839 - Attachment is obsolete: true
Attachment #8726840 - Attachment is obsolete: true
Comment on attachment 8726834 [details] MozReview Request: Bug 1245064 - Refactor interaction- and accessibility API; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38247/diff/2-3/
Comment on attachment 8726835 [details] MozReview Request: Bug 1245064 - Implement element pointer-interactability; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38249/diff/3-4/
Attachment #8726835 - Attachment description: MozReview Request: Bug 1245064 - Drop the window argument for element.isVisible; r?automatedtester → MozReview Request: Bug 1245064 - Implement element pointer-interactability; r?automatedtester
Attachment #8726837 - Attachment description: MozReview Request: Bug 1245064 - Reuse element.isXULElement; r?automatedtester → MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r?automatedtester
Comment on attachment 8726837 [details] MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38253/diff/3-4/
Comment on attachment 8727953 [details] MozReview Request: Bug 1245064 - Run click tests with new interactability algorithm; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38709/diff/1-2/
Comment on attachment 8726835 [details] MozReview Request: Bug 1245064 - Implement element pointer-interactability; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38249/diff/4-5/
Comment on attachment 8726837 [details] MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38253/diff/4-5/
Comment on attachment 8727950 [details] MozReview Request: Bug 1245064 - Pass all capabilities to listener; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38705/diff/1-2/
Comment on attachment 8727951 [details] MozReview Request: Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38707/diff/1-2/
Comment on attachment 8727953 [details] MozReview Request: Bug 1245064 - Run click tests with new interactability algorithm; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38709/diff/2-3/
Attachment #8727950 - Flags: review?(dburns) → review+
Attachment #8727951 - Flags: review?(dburns) → review+
Attachment #8727953 - Flags: review?(dburns) → review+
Comment on attachment 8726834 [details] MozReview Request: Bug 1245064 - Refactor interaction- and accessibility API; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38247/diff/3-4/
Attachment #8726834 - Attachment description: MozReview Request: Bug 1245064 - Refactor interaction- and accessibility API; r?automatedtester → MozReview Request: Bug 1245064 - Refactor interaction- and accessibility API; r=automatedtester
Comment on attachment 8726835 [details] MozReview Request: Bug 1245064 - Implement element pointer-interactability; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38249/diff/5-6/
Attachment #8726835 - Attachment description: MozReview Request: Bug 1245064 - Implement element pointer-interactability; r?automatedtester → MozReview Request: Bug 1245064 - Implement element pointer-interactability; r=automatedtester
Comment on attachment 8726837 [details] MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38253/diff/5-6/
Attachment #8726837 - Attachment description: MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r?automatedtester → MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r=automatedtester
Comment on attachment 8727950 [details] MozReview Request: Bug 1245064 - Pass all capabilities to listener; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38705/diff/2-3/
Attachment #8727950 - Attachment description: MozReview Request: Bug 1245064 - Pass all capabilities to listener; r?automatedtester → MozReview Request: Bug 1245064 - Pass all capabilities to listener; r=automatedtester
Attachment #8727950 - Flags: review+ → review?(dburns)
Comment on attachment 8727951 [details] MozReview Request: Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38707/diff/2-3/
Attachment #8727951 - Attachment description: MozReview Request: Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r?automatedtester → MozReview Request: Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r=automatedtester
Attachment #8727951 - Flags: review+ → review?(dburns)
Attachment #8727953 - Attachment description: MozReview Request: Bug 1245064 - Run click tests with new interactability algorithm; r?automatedtester → MozReview Request: Bug 1245064 - Run click tests with new interactability algorithm; r=automatedtester
Attachment #8727953 - Flags: review+ → review?(dburns)
Comment on attachment 8727953 [details] MozReview Request: Bug 1245064 - Run click tests with new interactability algorithm; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38709/diff/3-4/
Comment on attachment 8727953 [details] MozReview Request: Bug 1245064 - Run click tests with new interactability algorithm; r=automatedtester https://reviewboard.mozilla.org/r/38709/#review35549
Attachment #8727953 - Flags: review?(dburns) → review+
Comment on attachment 8727951 [details] MozReview Request: Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r=automatedtester https://reviewboard.mozilla.org/r/38707/#review35551
Attachment #8727951 - Flags: review?(dburns) → review+
Comment on attachment 8727950 [details] MozReview Request: Bug 1245064 - Pass all capabilities to listener; r=automatedtester https://reviewboard.mozilla.org/r/38705/#review35553
Attachment #8727950 - Flags: review?(dburns) → review+
Comment on attachment 8726834 [details] MozReview Request: Bug 1245064 - Refactor interaction- and accessibility API; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38247/diff/4-5/
Comment on attachment 8726835 [details] MozReview Request: Bug 1245064 - Implement element pointer-interactability; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38249/diff/6-7/
Comment on attachment 8726837 [details] MozReview Request: Bug 1245064 - Lower specificationLevel to 0; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38253/diff/6-7/
Comment on attachment 8727950 [details] MozReview Request: Bug 1245064 - Pass all capabilities to listener; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38705/diff/3-4/
Comment on attachment 8727951 [details] MozReview Request: Bug 1245064 - Lint GeckoDriver#setSessionCapabilities; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38707/diff/3-4/
Comment on attachment 8727953 [details] MozReview Request: Bug 1245064 - Run click tests with new interactability algorithm; r=automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38709/diff/4-5/
Fixed failure and triggered autoland again.
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: