WebDriver/Marionette/Marionette Client API: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
When writing Marionette tests in Python, the following API's are available.  These are all available in the self.marionette object which is available to all Marionette tests.  Most of these API's are analogs to Selenium methods documented here: 
When writing Marionette tests in Python, the following API's are available.  These are all available in the self.marionette object which is available to all Marionette tests.  Most of these API's are analogs to Selenium methods WebDriver methods.


=== Configuration ===
=== Configuration ===
Line 13: Line 13:
* {{ok|'''switch_to_window(window)'''}}: sets the active window; all future commands will be targeted here. 'window' is one of the id's returned by get_windows().
* {{ok|'''switch_to_window(window)'''}}: sets the active window; all future commands will be targeted here. 'window' is one of the id's returned by get_windows().
* {{ok|'''switch_to_frame(id)'''}}: sets the active frame; all future commands will be targeted here.  'id' is either the id of an iframe, an HTMLElement (see below) representing an iframe, or None to target the default top-level frame.
* {{ok|'''switch_to_frame(id)'''}}: sets the active frame; all future commands will be targeted here.  'id' is either the id of an iframe, an HTMLElement (see below) representing an iframe, or None to target the default top-level frame.
=== Navigation ===
* {{ok|'''get_url()'''}}: returns the current url
* {{done|'''navigate(url)'''}}: navigates to the specified url
* {{ok|'''go_back()'''}}: performs back navigation
* {{ok|'''go_forward()'''}}: performs forward navigation
* {{ok|'''refresh()'''}}: refresh the current page
=== Script Execution ===
Confirmed users
1,905

edits

Navigation menu