gecko-dev/testing/marionette
Henrik Skupin 247b5f9899 Bug 1335778 - Make element click command check for page load and wait. r=ato
If the click command triggered a page load, it should not return before
the page has been fully loaded. With this patch we allow an opt-in for
commands to make use of an unload check. It's set to 200ms right now, and
will cancel an ongoing waitForPageLoad() if no page activity is detected.

MozReview-Commit-ID: DWV53sckBS2

--HG--
extra : rebase_source : 1b7905c101b7ebf406e88c73be5d0e069b7342c0
2017-04-20 12:12:27 +02:00
..
chrome Bug 1331037 - Fix failures in test_localization.py for Fennec. r=ato 2017-01-18 09:47:58 +01:00
client Bug 1352501 - Remove Reader Mode promotion panel. r=jaws,MattN 2017-04-19 16:42:10 -04:00
components Bug 1356229 - Remove marionette.forcelocal preference; r=whimboo 2017-04-13 14:19:38 +01:00
harness Bug 1335778 - Make element click command check for page load and wait. r=ato 2017-04-20 12:12:27 +02:00
prefs Bug 1356229 - Remove marionette.forcelocal preference; r=whimboo 2017-04-13 14:19:38 +01:00
puppeteer Bug 1290850 - Force local update URL for software update unit tests. r=maja_zf 2017-04-24 15:09:25 +02:00
README Bug 1350887 - Add general overview documentation to Marionette; r=whimboo 2017-04-03 15:00:05 +01:00
accessibility.js Bug 1352802 - Typo fixes around 'accessible'. r=MattN 2017-04-03 09:47:00 -07:00
action.js Bug 1345653 - Handle document unload when dispatching actions; r=ato 2017-04-04 00:01:11 -04:00
addon.js Bug 1316975 - Correct function definition style in Marionette components; r=ato 2016-12-04 12:42:52 +01:00
assert.js Bug 1359004 - Add preliminary support for unexpected alerts r=whimboo 2017-04-20 18:00:46 +01:00
atom.js Bug 1203966 - Include links to unminified source of JS fragment atoms; r=maja_zf 2017-04-06 18:33:20 +01:00
browser.js Bug 1348872 - Add contentBrowser property to browser's Context class. r=ato 2017-03-27 11:02:36 +02:00
capture.js Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
cert.js Bug 1316975 - Correct function definition style in Marionette components; r=ato 2016-12-04 12:42:52 +01:00
cookies.js Bug 1223907: Refactor cookies in Marionette 2015-11-13 13:35:22 +00:00
driver.js Bug 1335778 - Make element click command check for page load and wait. r=ato 2017-04-20 12:12:27 +02:00
element.js Bug 1359050 - Test element in view with pointer events enabled; r=maja_zf 2017-04-17 19:34:44 +01:00
error.js Bug 1359050 - Test element in view with pointer events enabled; r=maja_zf 2017-04-17 19:34:44 +01:00
evaluate.js Backed out 8 changesets (bug 1353074) for Marionette crashes in test_accessiblecaret_selection_mode.py and timeouts in test_click.py 2017-04-18 19:09:51 -07:00
event.js Bug 1332279 - Include keyCode in KeyboardEvents synthesized for key actions; r=ato 2017-04-01 02:37:30 -04:00
frame.js Bug 1316975 - Correct function definition style in Marionette components; r=ato 2016-12-04 12:42:52 +01:00
interaction.js Bug 1335778 - Make element click command check for page load and wait. r=ato 2017-04-20 12:12:27 +02:00
jar.mn Bug 1356237 - Ship a copy of transport module in marionette. r=ato 2017-04-24 20:23:04 +02:00
l10n.js Bug 1331037 - Fix failures in test_localization.py for Fennec. r=ato 2017-01-18 09:47:58 +01:00
legacyaction.js Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
listener.js Bug 1335778 - Make element click command check for page load and wait. r=ato 2017-04-20 12:12:27 +02:00
logging.js Bug 1123506 - Evaluate scripts in content with lasting side-effects; r=automatedtester 2016-05-09 16:08:17 +01:00
mach_commands.py Bug 1323217 - Fix mach marionette-test. r=whimboo a=test-only 2016-12-13 18:10:51 +01:00
mach_test_package_commands.py Bug 1334209 - Activate mozharness virtualenv in-process from one click loaner mach commands, r=jmaher 2017-01-31 11:53:36 -05:00
marionette.eslintrc.js Bug 1315402: Make toolkit/mozapps/update pass no-undef. r=jaws 2016-11-04 17:03:01 -07:00
message.js Bug 1337743 - More data validation checks for Marionette messages; r=whimboo 2017-02-09 18:22:09 +00:00
modal.js Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
moz.build Bug 1350887 - Include Marionette prefs amongst defaults; r=ted,whimboo 2017-03-29 18:25:55 +01:00
navigate.js Bug 1291320 - Refactor page load algorithm for listener framescript. r=ato,automatedtester 2017-03-28 21:41:38 +02:00
packets.js Bug 1356237 - Ship a copy of transport module in marionette. r=ato 2017-04-24 20:23:04 +02:00
proxy.js Bug 1336214 - Preserve stacktraces in Marionette errors; r=maja_zf 2017-02-10 18:36:52 +00:00
server.js Bug 1352501 - Remove Reader Mode promotion panel. r=jaws,MattN 2017-04-19 16:42:10 -04:00
session.js Bug 1355471 - Test timeout field before value's typing; r=whimboo 2017-04-11 14:57:01 +01:00
simpletest.js Bug 1123506 - Evaluate scripts in content with lasting side-effects; r=automatedtester 2016-05-09 16:08:17 +01:00
stream-utils.js Bug 1356237 - Ship a copy of transport module in marionette. r=ato 2017-04-24 20:23:04 +02:00
test_action.js Bug 1347658: Allow negative integers for Marionette pointerMove. r=maja_zf 2017-03-15 22:28:10 +00:00
test_assert.js Bug 1359004 - Add preliminary support for unexpected alerts r=whimboo 2017-04-20 18:00:46 +01:00
test_element.js Bug 1303234 - Implement extracting action chain from a request; r=ato,jgraham 2016-10-26 13:04:48 -04:00
test_error.js Bug 1359050 - Test element in view with pointer events enabled; r=maja_zf 2017-04-17 19:34:44 +01:00
test_message.js Bug 1337743 - More data validation checks for Marionette messages; r=whimboo 2017-02-09 18:22:09 +00:00
test_navigate.js Bug 1291320 - Refactor page load algorithm for listener framescript. r=ato,automatedtester 2017-03-28 21:41:38 +02:00
test_session.js Bug 1355471 - Test timeout field before value's typing; r=whimboo 2017-04-11 14:57:01 +01:00
test_wait.js Bug 1319237 - Lower timeout elapse evaluation count; r=me a=followup-to-prevent-back out 2017-02-13 12:02:01 -08:00
transport.js Bug 1356237 - Ship a copy of transport module in marionette. r=ato 2017-04-24 20:23:04 +02:00
unit.ini Bug 1319237 - Generalise wait condition utility; r=automatedtester,maja_zf 2016-11-21 23:41:20 +01:00
wait.js Bug 1319237 - Generalise wait condition utility; r=automatedtester,maja_zf 2016-11-21 23:41:20 +01:00

README

Этот файл содержит неоднозначные символы Юникода!

Этот файл содержит неоднозначные символы Юникода, которые могут быть перепутаны с другими в текущей локали. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы подсветить эти символы.

MARIONETTE

  Marionette is the remote protocol that lets OOP programs communicate
  with, instrument, and control Gecko.

DESCRIPTION

  Marionette is an automation driver for Mozillas Gecko engine.
  It can remotely control either the UI or the internal JavaScript of
  the Gecko platform, such as Firefox.  It can control both the chrome
  and the content document, giving a high level of control and ability to
  replicate user interaction.  In addition to performing actions on the
  browser, Marionette can also read properties and attributes of the DOM.

USAGE

  It is included in Firefox, but not enabled by default unless the
  --marionette flag is passed or the marionette.enabled preference is
  set to true.

  To start Firefox with the remote protocol turned on:

  	% firefox --marionette
  	…
  	1491228343089	Marionette	INFO	Listening on port 2828

  This binds to a TCP socket, over which CLIENTS can communicate with
  Marionette using the PROTOCOL.

PROTOCOL

  Marionette provides an asynchronous, parallel pipelining user-facing
  interface.  Message sequencing limits chances of payload race conditions
  and provides a uniform way in which payloads are serialised.

  Clients that deliver a blocking WebDriver interface are still expected
  to not send further command requests before the response from the last
  command has come back, but if they still happen to do so because of
  programming error, no harm will be done.  This guards against bugs
  such as https://bugzil.la/1207125.

  Schematic flow of messages:

  	             client      server
  	               |            |
  	    msgid=1    |----------->|
  	               |  command   |
  	               |            |
  	    msgid=2    |<-----------|
  	               |  command   |
  	               |            |
  	    msgid=2    |----------->|
  	               |  response  |
  	               |            |
  	    msgid=1    |<-----------|
  	               |  response  |
  	               |            |

  The protocol consists of a COMMAND message and the corresponding
  RESPONSE message.  A RESPONSE message must always be sent in reply to
  a COMMAND message.

  This means that the server implementation does not need to send the
  reply precisely in the order of the received commands: if it receives
  multiple messages, the server may even reply in random order.  It is
  therefore strongly adviced that clients take this into account when
  implementing the client end of this wire protocol.

  This is required for pipelining messages.  On the server side, some
  functions are fast, and some less so.  If the server must reply in
  order, the slow functions delay the other replies even if its execution
  is already completed.

COMMAND

  The request, or command message, is a four element JSON array as shown
  below, that may originate from either the client- or server remote ends:

  	[type, message ID, command, parameters]

  type
	Must be 0 (integer).  This indicates that the message is the
	COMMAND message.

  message ID
    A 32-bit unsigned integer.  This number is used as sequencing number
    that uniquely identifies a pair of COMMAND and RESPONSE messages.
    The other remote part will reply with a corresponding RESPONSE with
    the same message ID.

  command
    A string identifying the RPC method or command to execute.

  parameters
    An arbitrary JSON serialisable object.

RESPONSE

  The response message is also a four element array as shown below,
  and must always be sent after receiving a COMMAND:

  	[type, message ID, error, result]

  type
    Must be 1 (integer).  This indicates that the message is the RESPONSE
    message.

  message ID
    A 32-bit unsigned integer.  This corresponds to the COMMAND
    messages message ID.

  error
    If the command executed correctly, this field is null.  If the error
    occurre on the server-side, then this field is an ERROR object.

  result
    The result object associated with the COMMAND, if it executed
    correctly.  If an error occurred on the server-side, this field
    is null.

  The structure of the result entry can vary, but is documented
  individually for each command in ./driver.js.

ERROR OBJECTS

  An ERROR object is a serialisation of JavaScript error types, and is
  structured like this:

  	{
  		"error": "invalid session id",
  		"message": "No active session with ID 1234",
  		"stacktrace": ""
  	}

  All the fields of the error object are required, so the stacktrace and
  message fields may be empty strings.  The error field is on the other
  hand guaranteed to be one of the JSON error codes as laid out by the
  WebDriver standard:

  	https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors

CLIENTS

  Clients may be implemented in any language that is capable of writing
  and receiving data over TCP socket.  A reference client is provided in
  tree (under ./client).  Clients may be implemented both synchronously
  and asynchronously, although the latter is impossible in protocol
  levels 2 and earlier due to the lack of message indexing.

DOCUMENTATION

  General introduction:

  	https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette

  Protocol definition:

	https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/Protocol

  Generated Python client API documentation:

  	https://marionette-client.readthedocs.org/

BUGS

  Server and Python client bugs are tracked in the Testing :: Marionette
  component in Bugzilla:

  	https://bugzilla.mozilla.org/buglist.cgi?product=Testing&component=Marionette

  geckodriver (found in ../geckodriver), the HTTP proxy for using W3C
  WebDriver-compatible clients with Marionette, tracks its bugs on GitHub:

  	https://github.com/mozilla/geckodriver/issues