This patch adds marshaling of HTMLFormControlsCollection,
HTMLAllCollection, and HTMLOptionsCollection element collections to
Marionette.
It will allow us you to return from HTMLSelectElement.options,
document.forms[0].elements, and document.all. This is in
addition to the already supported document.querySelector
(NodeList), document.getElementsBy* (HTMLCollection), and
Array.from(ELEMENT...) collections.
MozReview-Commit-ID: 71a65lZRn4S
--HG--
extra : rebase_source : aff3490ceb0db110f392956baaacbd5e2e7acb62
This gives up parity with the WebDriver project and brings us in line with the current
specification http://w3c.github.io/webdriver/webdriver-spec.html#dfn-link-text
MozReview-Commit-ID: 9OD6B2pKTfx
--HG--
extra : rebase_source : 075fe800d1a82593ebb55987a2eccb2d318e0c5f
Publish the findByXPath and findAllByXPath functions to match the style
of the recently introduces findByLinkText and findByPartialLinkText
functions.
Do note that this patch rearranges the input arguments these functions
take. Possibly we do not have to send the root element as input at all.
MozReview-Commit-ID: 4H7kpZBUsTw
--HG--
extra : rebase_source : 72c11a2a3e47158d6696db2c5995bea09e57794e
Lower-case "a" matches hyperlinks in XHTML documents as well as HTML
documents. Upper-case "A" only matches HTML documents.
The patch also refactors link text- and partial link text lookup into
distinct functions, so that there is no more worry about variable scoping
in match blocks.
MozReview-Commit-ID: FB7MAmosBoR
--HG--
extra : rebase_source : 65d0807e33a279fb822078329128c3f3c219a555
This matches the Map data structure in JavaScript.
MozReview-Commit-ID: 5l2xOb4W2BC
--HG--
extra : rebase_source : 706f8e60fbfc364e56da83f15b9e1a4a94af9c9a
Moves ElementManager#wrapValue to the testing/marionette/element.js
module level and renames it to toJson.
MozReview-Commit-ID: GJBl2L1GRxZ
--HG--
extra : rebase_source : 5fc81a6b0ebfbd6a12557b3b746e6968c235d674
Moved ElementManager#convertWrappedArguments to the
testing/marionette/element.js module scope and renamed it to fromJson.
MozReview-Commit-ID: JMTZcG0JSUE
--HG--
extra : rebase_source : 613faca6a8c81b1ff435c538b0a7347ae548c288
Renames ElementManager to element.Store, exposing it on the
testing/marionette/element.js module. Shortens getKnownElement(uuid)
to get(uuid). Introduces new method has(uuid) to replace some unnecessary
checks in testing/marionette/driver.js and testing/marionette/listener.js.
MozReview-Commit-ID: D5qAlqrIxi
--HG--
extra : rebase_source : 22fda922e4c5f7bfcd1a5bcbcec6ae1003411535
Moves element retrieval methods from ElementManager to the
testing/marionette/element.js module itself. This means some more
work needs to be done by the caller, but avoids bloat by ensuring
ElementManager does not end up as a super-object.
MozReview-Commit-ID: 5LGe0vpSWwS
--HG--
extra : rebase_source : d7f4bd64cd1a92ad20a33496708d3f0136531d9f
This allows us to converge with webdriver project which scrolls to the
start of the element instead of the end.
MozReview-Commit-ID: ErQ18bTeo5m
--HG--
extra : rebase_source : 0cb69c80da561e0b0fda288841c415fd206fe907
This fixes a leak where timers were not cancelled upon promise rejection.
When the function passed to implicitlyWaitFor is rejected for not finding
elements after the timeout has elapsed, the elementSearch callback is
no longer called because the timer is cancelled when it calls reject().
MozReview-Commit-ID: FR2iA8s1NjX
--HG--
extra : rebase_source : 80f4b13d15cf3497a8d4b20bca98450ad3bc1b5e
By using a timer the first invocation of the callback is happening after the specified interval.
That means by a default of 100ms we loose that time on every call of implicit wait, and it will
slow-down the test execution drastically. To prevent this lets manually invoke the callback
before starting the timer.
MozReview-Commit-ID: Ayy1GPEaY92
--HG--
extra : rebase_source : 2fac7b5578ec42af5050fad21ca9c3d5cfdca3e1
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.
MozReview-Commit-ID: BP60SGj49OW
--HG--
extra : rebase_source : d84d38510e28ab5e0debce2051e336e1fd3f0f86
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.
MozReview-Commit-ID: BP60SGj49OW
--HG--
extra : rebase_source : 357accaa38b44704fcaf839aa50e1e29af0b3f99
The return values from the different element search functions in searchFn
have inconsistent return types, and a null check is usually not what
we want. In order to have findElement consistently return a no such
element error, we need to do a loose false test.
This bug has affected the findElement command when using the tag
name, name, class name, link text, and partial link text selectors.
Other selectors were unaffected.
MozReview-Commit-ID: C26R3YrqKyf
--HG--
extra : rebase_source : dc723ae147b9208b4274ffc4a5338f0107ddd0ed
The xOffset and yOffset arguments to element.coordinates previously
checked loose falsiness. If a number <= 0 would be given as an argument,
they would not be used and it would return the centre of the element.
This change adds more checks, documentation, and tests.
MozReview-Commit-ID: KmsiVFipzWx
--HG--
extra : rebase_source : 96e6c8c127071356fec029f5eaa4254ae60930b3
Removes the exported constants from testing/marionette/element.js and
introduces the migrates to using the element.Strategy enum consistently
throughout Marionette.
The supported strategies array passed into ElementManager's ctor has
also received some much needed attention and now actually works.
MozReview-Commit-ID: LPuDX0aishM
--HG--
extra : rebase_source : bb06ea5a25d9a0dbcd6f3e1311d31df95cd4e26d
Element location is rewritten with this patch in order to make it
compatible for use with promises. This makes consuming the API nicer
in the wider context of Marionette, since it no longer takes callbacks
and no longer has to be wrapped in external promises to be compatible
with the new dispatching technique.
MozReview-Commit-ID: DjZOXPqkZ5j
--HG--
extra : rebase_source : a5f9fb0b252584e69bbba7d1a67cc4ef45e67b03