User Guide

FoxPuppet is a library for automating user interactions in Firefox using Selenium. This section give some example use cases of FoxPuppet.


This is an example for setting up FoxPuppet and opening a private window:

from foxpuppet import FoxPuppet
from selenium.webdriver import Firefox

selenium = Firefox()
foxpuppet = FoxPuppet(selenium)

window = foxpuppet.browser.open_window(private=True)

This example opens first a non-private browser window, then proceeds to open a private browser window. Finally it quits via selenium.quit().

Note:The initial browser window is automatically assigned to the browser attribute and is always available.