The Python client does not currently exhaust all the command
requests originating from the server as pointed out by :bhsu in
https://bugzilla.mozilla.org/show_bug.cgi?id=1211503#c12.
This prevents making multiple calls to runEmulatorCmd and runEmulatorShell
inside executeScript/executeJSScript/executeAsyncScript. This failure
makes marionette-webapi fail.
We loop through all the commands originating from the server until we
get sent back a response.
r=dburns
--HG--
extra : commitid : 1SVHwcJrDcU
The default behaviour is unchanged: gecko.log and logcat are saved to the
cwd, a temporary Firefox profile is cloned or created in TMP.
When a path is specified via --workspace, gecko.log, logcat and the Firefox
profile directory are all saved there instead. A profile saved in the
workspace does not get deleted at the end of a session unless it's a clone.
--HG--
extra : rebase_source : 155c26af065f55bcba0f2a139c9f06e4a526f740
The Python client does not currently exhaust all the command
requests originating from the server as pointed out by :bhsu in
https://bugzilla.mozilla.org/show_bug.cgi?id=1211503#c12.
This prevents making multiple calls to runEmulatorCmd and runEmulatorShell
inside executeScript/executeJSScript/executeAsyncScript. This failure
makes marionette-webapi fail.
We loop through all the commands originating from the server until we
get sent back a response.
r=dburns
--HG--
extra : commitid : 8oBRRddi4TJ
extra : rebase_source : 98b10ccaba525acd391bf614a91aec1b8f7daf4e
Services.appinfo is populated by the target compile system's OS name,
taken from the OS_TARGET configure variable.
By using Services.sysinfo instead, we are returning the effective current
local system's operating system, which is similar to what is found in
Gecko's UA string.
r=dburns
--HG--
extra : commitid : 2UVeU9zzO6p
extra : rebase_source : cea1d6f8bc00173a68a28b51df33d59320be8093
Corrects type checks on parameters passed to command, indentation level,
and clarifies when the code leaps into content space.
Thanks to Stanislas Daniel Claude Dolcini for doing the first iteration
fix for this.
r=dburns
--HG--
extra : commitid : 3HeTTEsvvBx
extra : rebase_source : 7088760ae24d695a2f9fa20b14a16cdec2e125d7
There have been a number of improvements to the marionette test runner
unfortunately we missed this regression.
--HG--
extra : commitid : KE4FPolRysN
extra : rebase_source : 546152a67a4fd96a1d3c63ba914839c316022eaf
* BaseMarionetteRunner: any change to self.bin resets self.marionette and
self.tests, so you change binaries between calls to run_tests()
* Refactor runtests.py to make it easier to extend/customize the harness
for different test suites. Add more error handling.
--HG--
extra : transplant_source : %BB%AC%A0%93%A1s%7F%23%A5%DER%E0%AF%B8Q%AF%83%98d%D9
Prepare release of new Python packages for Marionette, with the following
versions:
marionette-client 1.1.0
marionette-driver 1.1.0
marionette-transport 1.0.0
r=dburns
--HG--
extra : commitid : DelEI4Q7Gnu
extra : rebase_source : 7cf900d42fbd60e44e6855c93807a7ba1409fb16
This allows us from a child frame to go up one level. This is documented
at http://w3c.github.io/webdriver/webdriver-spec.html#switch-to-parent-frame
--HG--
extra : commitid : GtXAxWLM61v
extra : rebase_source : 9b18d51a5dbefb4dad1cb39b229dc3d55cfae26a
extra : histedit_source : d0a0479e0c9946f242efd71e722685447ae48fd1
Futures-proofs the Marionette Python client to have support for level
3 of the Marionette protocol outlined in bug 1211489.
This patch changes the marionette-transport API most notably by renaming
the MarionetteTransport class to TcpTransport and by splitting the
receive-capabilities of TcpTransport.send into a new function called
request.
Furthermore it introduces a message data structure for dealing with
incoming responses and commands, and for marshaling messages to send in
order to support all three protocol levels.
r=dburns
r=jgriffin
--HG--
extra : commitid : 3jwoFepZzgy
extra : rebase_source : 5012e774b6edf6a1d53db22e360b5a0b063dd59b
We already had focus changing tests covered by
_test_focus_obtained_by_long_press(). This patch adds tests for focus
not being changed from an editable element after long-pressing on a
non-selectable element.
These tests will fail after reverting this change.
"Bug 1197739 - Do not change focus too early unless the frame is selectable"
https://hg.mozilla.org/mozilla-central/rev/4f2822bbbdb2
--HG--
extra : transplant_source : %26%E8%BAx%D2y%3DS%5BvLH%0Fy%11N%2B%D9%3B%E0
Errors thrown by takeScreenshot used to be silently ignored. When the
command started using the new dispatching technique in bug 1202663,
it was surfaced we do not support taking screen captures of SVG documents.
Since this is a requirement for Web Platform Tests, this patch corrects
the wrong assumptions about document body and document element.
This patch also significantly refactors the screen capture code, but
only uses the new implementation in contnent space, since some further
modifications are required to use it in chrome.
r=dburns
r=jgriffin
--HG--
extra : commitid : DdCIEpd5PEJ
extra : rebase_source : 7357010f992d7f995765c685000892cc59d9ec9a
The screen capture tests were not testing that the screenshots are of
what they're meant to be of. In order to confidently fix bug 1202663,
these new tests will ensure we do not have any regressions.
r=jgriffin
r=dburns
--HG--
extra : commitid : AulnylZMj6Y
extra : rebase_source : c2604e0e3bf1a975b1f35a149ef7f2bdb08840de
The screen capture tests were not testing that the screenshots are of
what they're meant to be of. In order to confidently fix bug 1202663,
these new tests will ensure we do not have any regressions.
r=jgriffin
--HG--
extra : commitid : GkRPL9uVwjG
extra : rebase_source : 594ea1655f61552d430c3242e6b3418e550c27b3
is called. r=ato
This means that we are now doing step 7 in
http://w3c.github.io/webdriver/webdriver-spec.html#get
--HG--
extra : commitid : KQi5f9c0C1r
extra : rebase_source : 9c77a1d9aadf529ddbae2d32e0e1f9c4d532e181
extra : histedit_source : f40f377e1398f72fa68efd69ad864d9e4ae7e2b4
* Incorporate the for-loop in python into javascript so that we only
need to call execute_script() once.
* Add documentation for parameters.
--HG--
extra : commitid : 88Mi3beYfSI
extra : rebase_source : bcf949c8a6055cf6ccaf541f8005fe88256555be
The version numbers have been moved to be major.minor.patch to allow
better versioning moving forward.
--HG--
extra : commitid : Lm21l6zZmge
extra : rebase_source : 432a27f8727106a78114b745aca019771f254e93
Add get_pref(), set_pref(), set_prefs() to make manipulate preferences
easier.
enforce_gecko_prefs() did the similar job as set_prefs(), but it will
restart the browser if a preference to be set are different from what is
already set in the system. Not all gecko preferences require a restart
to work. Using set_prefs() should make testing faster. See bug 1048554.
--HG--
extra : commitid : 8zY9oaHkSW1
extra : rebase_source : 787114d94f50e9f132fb7d5898cecf104e281700
This test sends keys to the urlbar causing a page navigation, then waits on
the current url to confirm the navigation is reflected. Because the navigation
changes remoteness, the url check and loading the content listener in the
new process race. When the url check wins, it causes a hang by sending a
message before the frame script to receive it loads.
This is a very specific scenario that only impacts tests that need to cause
navigation to in-process pages with key events. If these sort of tests
become a priority, this will need to be revisited.
--HG--
extra : commitid : LRu93romh31
In a following patch, all DevTools moz.build files will use DevToolsModules to
install JS modules at a path that corresponds directly to their source tree
location. Here we rewrite all require and import calls to match the new
location that these files are installed to.
--HG--
extra : commitid : F2ItGm8ptRz
extra : rebase_source : b082fe4bf77e22e297e303fc601165ceff1c4cbc
The findChildElement and findChildElements commands were originally
added to provide Selenium compatibility because it sends an "id" field
in the body.
They are both unneeded now that we have wires which extracts the element
ID from the URI template and sets the "element" field that the normal
findElement and findElements commands use.
r=dburns
--HG--
extra : commitid : 9UOUJoukHH1
extra : rebase_source : 2f848ebbfa69b82b03d718340b8203d9183083d6
When a TEXTAREA element is focused it returns the cursor to the last
position was at, or places it last. INPUT @type="text" (or any other
textual input element) places the caret at the beginning. Because of
this we move the caret to the end of the input field. The next time
the element is focussed, the cursor should move to the end.
The layout touch caret tests relied on the caret being left in its
previous position. This patch addresses that by using the advanced user
interaction API for these test cases.
r=jgriffin
--HG--
extra : commitid : 7tchyrqIp00
extra : rebase_source : 5f164dc051183056c92a2da7fb6e601fff748b29
We attach the emulator commands outside of the simpletest harness.
Removing this makes testing/marionette/simpletest.js less dependent
on Marionette.
r=dburns
--HG--
extra : commitid : 8jVQBdufXQg
extra : rebase_source : 5ea9660825fd76504d0cc7fdbc1bebba947836f5
getElementSize, getElementLocation, and getElementPosition are all
deprecated. They are not used by the client bindings.
r=dburns
--HG--
extra : commitid : FkXJjFafLDR
extra : rebase_source : 4d9f4a1b3ee461ad593854ec543c9ef26277377b
When a TEXTAREA element is focused it returns the cursor to the last
position was at, or places it last. INPUT @type="text" (or any other
textual input element) places the caret at the beginning. Because of
this we move the caret to the end of the input field. The next time
the element is focussed, the cursor should move to the end.
r=jgriffin
--HG--
extra : commitid : 56D5Oqfl8Nh
extra : rebase_source : e13a68395fdfe59fa93c45b2b5ccca28283f11e2
Introduce protocol version levels in the Marionette server.
On establishing a connection to a local end, the remote will return a
`marionetteProtocol` field indicating which level it speaks.
The protocol level can be used by local ends to either fall into
compatibility mode or warn the user that the local end is incompatible
with the remote.
The protocol is currently also more expressive than it needs to be and
this expressiveness has previously resulted in subtle inconsistencies
in the fields returned.
This patch reduces the amount of superfluous fields, reducing the
amount of data sent. Aligning the protocol closer to the WebDriver
specification's expectations will also reduce the amount of
post-processing required in the httpd.
Previous to this patch, this is a value response:
{"from":"0","value":null,"status":0,"sessionId":"{6b6d68d2-4ac9-4308-9f07-d2e72519c407}"}
And this for ok responses:
{"from":"0","ok":true}
And this for errors:
{"from":"0","status":21,"sessionId":"{6b6d68d2-4ac9-4308-9f07-d2e72519c407}","error":{"message":"Error loading page, timed out (onDOMContentLoaded)","stacktrace":null,"status":21}}
This patch drops the `from` and `sessionId` fields, and the `status`
field from non-error responses. It also drops the `ok` field in non-value
responses and flattens the error response to a simple dictionary with the
`error` (previously `status`), `message`, and `stacktrace` properties,
which are now all required.
r=jgriffin
--HG--
extra : commitid : FbEkv70rxl9
extra : rebase_source : 3116110a0d197289cc95eba8748be0a33566c5a5
Removes FrameSendFailureError and FrameNotInitializedError from the
Marionette Python client.
r=davehunt
--HG--
extra : commitid : GUUlKplFtOH
extra : rebase_source : 8d4d135f8a0adee8491b0af2b8c65861adc712ca
Do note that this test is disabeld in the manifest.
r=dburns
--HG--
extra : commitid : 9P4lCsipXFI
extra : rebase_source : f1b712f5b0f2558893f2c86dd4dae3bdb3d380ee
This allows WebDriver compatibility to create valid URI.
--HG--
extra : commitid : 7JjQgqwKr8P
extra : rebase_source : 30e59c18b69ab404608c6b44f1dc11742b95ac78
Because of the asynchronous behaviour of some internal utilities, such
as ElementManager, we need to employ promises to create a bridge over
them and the synchronous returning functions.
r=dburns
--HG--
extra : commitid : LneaNFIEWhx
extra : source : 12fe4474c9bc791395603242bc2f865e39212aa9
Currently the UUID returns the `{}` which is not valid and breaks
URI Templates used in WebDriver languages
--HG--
extra : commitid : 5TOoNz5yfms
extra : rebase_source : f51303fc4d15d886c04f20140e08c656c91eb2c6
Mozharness appears to do a check for the word exception and is seeing these
tests as failures when they are not.
--HG--
extra : commitid : DY4JNzCuOt3
extra : rebase_source : f7f9bc2059d145bde1df36bd2898ffbed6cbbdcf
Whilst it is not a goal for the Marionette protocol to be fully compatible
with WebDriver due to the different transport mechanisms, bug 1153822
adjusts the Marionette protocol closer to what is prescribed in the
WebDriver specification.
This patch adds support for the new protocol (level or version 2)
to the Python bindings with backwards compatibility for the earlier,
existing protocol (1).
r=jgriffin
--HG--
extra : commitid : CiAKTE3h1nG
extra : rebase_source : ea3ed4ec021febac7f3b2ae2c10ec583a3ddfcff
This allows us to return httpOnly key when doing getCookie and serialising the result
Details in http://w3c.github.io/webdriver/webdriver-spec.html#dfn-serialized-cookie
--HG--
extra : commitid : Fkr0udCIjfm
extra : rebase_source : 7e837a36947e83520eae26c3f41b45dd5c211829
extra : histedit_source : 806d7c8249128b08bc1ad448389bb639e0369c07
By passing an object to capabilities like
{
"requiredCapabilities": {
"proxy": {... }
}
}
Specification detail at http://w3c.github.io/webdriver/webdriver-spec.html#dfn-set-the-proxy
--HG--
extra : commitid : 3xR7tPDgMK4
extra : rebase_source : b3af3dfe7d2d0e1701ca0b2162f8ae517b5b4c9a
This removes ambiguity as to which modules are being imported, making
import slightly faster as Python doesn't need to test so many
directories for file presence.
All files should already be using absolute imports because mach command
modules aren't imported to the package they belong to: they instead
belong to the "mach" package. So relative imports shouldn't have been
used.
--HG--
extra : commitid : 6tFME1KKfTD
extra : rebase_source : 78728f82f5487281620e00c2a8004cd5e1968087