Developer Interface

This part of the documentation describes the interfaces for using FoxPuppet.


class foxpuppet.foxpuppet.FoxPuppet(selenium)[source]

Set up the interface for interacting with the Firefox browser.

Parameters:selenium – (WebDriver): Firefox WebDriver object.


This module contains all of the window types as well as the window manager.

Window Manager


A window manager that controls the creation of window objects.

Parameters:selenium – (WebDriver): Firefox WebDriver object.

Browser Window

class, handle)[source]

Representation of a browser window.


Close the window.


Return the inner DOM window element.

Returns:WebDriver element object for the DOM window element.
Return type:WebElement

Major version of Firefox in use.

Returns:Major component of the Firefox version.
Return type:int

Property that checks if the specified window is private or not.

Returns:True if this is a Private Browsing window.
Return type:bool

Provide access to the Navigation Bar.

Returns:FoxPuppet NavBar object.
Return type:NavBar

Provide access to the currently displayed notification.

Returns:FoxPuppet BaseNotification object.
Return type:BaseNotification

Open a new browser window.

Parameters:private (bool) – Optional parameter to open a private browsing window. Defaults to False.
Returns:Opened window.
Return type:BrowserWindow

Switch focus for Selenium commands to this window.

wait_for_notification(notification_class=<class ''>)[source]

Wait for the specified notification to be displayed.

Parameters:notification_class (BaseNotification, optional) – The notification class to wait for. If None is specified it will wait for any notification to be closed. Defaults to BaseNotification.
Returns:Firefox notification.
Return type:BaseNotification