Page Info Window

PageInfoWindow

class firefox_puppeteer.ui.pageinfo.window.PageInfoWindow(marionette, window_handle)

Representation of a page info window.

close(trigger='shortcut', force=False)

Closes the current page info window by using the specified trigger.

Parameters:
  • trigger – Optional, method to close the current window. This can be a string with one of menu (OS X only) or shortcut, or a callback which gets triggered with the current PageInfoWindow as parameter. Defaults to shortcut.
  • force – Optional, forces the closing of the window by using the Gecko API. Defaults to False.
closed

Returns closed state of the chrome window.

Returns:True if the window has been closed.
deck

The Deck instance which represents the deck.

Returns:Reference to the deck.
focus()

Sets the focus to the current chrome window.

focused

Returns True if the chrome window is focused.

Returns:True if the window is focused.
handle

Returns the window handle of the chrome window.

Returns:window handle.
loaded

Checks if the window has been fully loaded.

Returns:True, if the window is loaded.
localize_entity(entity_id)

Returns the localized string for the specified DTD entity id.

Parameters:entity_id – The id to retrieve the value from.
Returns:The localized string for the requested entity.
Raises:MarionetteException – When entity id is not found.
localize_property(property_id)

Returns the localized string for the specified property id.

Parameters:property_id – The id to retrieve the value from.
Returns:The localized string for the requested property.
Raises:MarionetteException – When property id is not found.
menubar

Provides access to the menu bar, for example, the File menu.

See the MenuBar reference.

open_window(callback=None, expected_window_class=None, focus=True)

Opens a new top-level chrome window.

Parameters:
  • callback – Optional, function to trigger the window to open. It is triggered with the current BaseWindow as parameter. Defaults to window.open().
  • expected_class – Optional, check for the correct window class.
  • focus – Optional, if true, focus the new window. Defaults to True.
send_shortcut(command_key, **kwargs)

Sends a keyboard shortcut to the window.

Parameters:
  • command_key – The key (usually a letter) to be pressed.
  • accel – Optional, If True, the Accel modifier key is pressed. This key differs between OS X (Meta) and Linux/Windows (Ctrl). Defaults to False.
  • alt – Optional, If True, the Alt modifier key is pressed. Defaults to False.
  • ctrl – Optional, If True, the Ctrl modifier key is pressed. Defaults to False.
  • meta – Optional, If True, the Meta modifier key is pressed. Defaults to False.
  • shift – Optional, If True, the Shift modifier key is pressed. Defaults to False.
switch_to(focus=False)

Switches the context to this chrome window.

By default it will not focus the window. If that behavior is wanted, the focus parameter can be used.

Parameters:focus – If True, the chrome window will be focused.
Returns:Current window as BaseWindow instance.
window_element

Returns the inner DOM window element.

Returns:DOM window element.

Deck

class firefox_puppeteer.ui.pageinfo.deck.Deck(marionette, window, element)
element

Returns the reference to the underlying DOM element.

Returns:Reference to the DOM element
feed

The FeedPanel instance for the feed panel.

Returns:FeedPanel instance.
general

The GeneralPanel instance for the general panel.

Returns:GeneralPanel instance.
media

The MediaPanel instance for the media panel.

Returns:MediaPanel instance.
panels

List of all the Panel instances of the current deck.

Returns:List of Panel instances.
permissions

The PermissionsPanel instance for the permissions panel.

Returns:PermissionsPanel instance.
security

The SecurityPanel instance for the security panel.

Returns:SecurityPanel instance.
select(panel)

Selects the specified panel via the tab element.

Parameters:panel – The panel to select.
Returns:Panel instance of the selected panel.
selected_index

The index of the currently selected panel.

Returns:Index of the selected panel.
selected_panel

A Panel instance of the currently selected panel.

Returns:Panel instance.
window

Returns the reference to the chrome window.

Returns:BaseWindow instance of the chrome window.

PageInfoPanel

class firefox_puppeteer.ui.pageinfo.deck.PageInfoPanel(marionette, window, element)
element

Returns the reference to the underlying DOM element.

Returns:Reference to the DOM element
tab

The DOM element which represents the corresponding tab element at the top.

Returns:Reference to the tab element.
window

Returns the reference to the chrome window.

Returns:BaseWindow instance of the chrome window.

SecurityPanel

class firefox_puppeteer.ui.pageinfo.deck.SecurityPanel(marionette, window, element)
domain

The DOM element which represents the domain textbox.

Returns:Reference to the textbox element.
element

Returns the reference to the underlying DOM element.

Returns:Reference to the DOM element
owner

The DOM element which represents the owner textbox.

Returns:Reference to the textbox element.
tab

The DOM element which represents the corresponding tab element at the top.

Returns:Reference to the tab element.
verifier

The DOM element which represents the verifier textbox.

Returns:Reference to the textbox element.
view_certificate

The DOM element which represents the view certificate button.

Returns:Reference to the button element.
view_cookies

The DOM element which represents the view cookies button.

Returns:Reference to the button element.
view_passwords

The DOM element which represents the view passwords button.

Returns:Reference to the button element.
window

Returns the reference to the chrome window.

Returns:BaseWindow instance of the chrome window.