WebDriver/Marionette/DevNotes: Difference between revisions

Line 4: Line 4:
== Current Status ==
== Current Status ==


Marionette currently supports the following [https://wiki.mozilla.org/Auto-tools/Projects/Marionette/JSON_Protocol JSON calls]:
Marionette currently supports the calls listed [https://wiki.mozilla.org/Auto-tools/Projects/Marionette/Marionette_Client_API here].
 
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session newSession] : create a new testing session. For fennec/Firefox tests, this creates a new tab.
* setContext : sets the context in which commands will be run. Either "chrome" or "content"
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/execute executeScript] : executes the given JS in the context. Given JS is assumed to be synchronous.
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/timeouts/async_script setScriptTimeout] : sets the timeout for the executeAsyncScript. This must be set if using executeAsyncScript.
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/execute_async executeAsyncScript] : executes the given JS in the context, and returns only when the callback is called . You can use the Selenium-style callback, arguments[arguments.length-1]( return_value ), or our less magical looking substitute: marionetteScriptFinished( return_value ). This function returns with a failure if the timeout is reached.
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/timeouts/implicit_wait setSearchTimeout] : set the timeout specifying how long we will try to retrieve an element (used in conjunction with findElement).
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element findElement] : find a given element using a given method (ex: by id, tag name, etc.)
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/click clickElement] : click the given element. This is currently done by calling ".click()" on the DOM object, but we will have fallback support with the accessibility interface.
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/url goUrl] : navigate to a given url.
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId deleteSession] : close the test session. This closes the session's tab.
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/back goBack] : go back in history
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/forward goForward ] : go forward in history
* [http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/refresh refresh] : refresh the current page


These calls work on desktop Firefox. B2G has support for all but navigation calls (goBack, goUrl, etc.).  Birch/Mobile support has yet to be added.
These calls work on desktop Firefox. B2G has support for all but navigation calls (goBack, goUrl, etc.).  Birch/Mobile support has yet to be added.
Confirmed users
561

edits