Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Added user guide (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbenny35 authored and davehunt committed Jan 31, 2017
1 parent b369fc9 commit e01c7dd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/user_guide.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
User Guide
==========

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

Example
-------

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)
selenium.quit()

This example opens first a non-private browser window, then proceeds to open a private browser window.
Finally it quits via :py:func:`selenium.quit`.

:Note: The initial browser window is automatically assigned to the :py:attr:`browser` attribute and is always available.
1 change: 1 addition & 0 deletions foxpuppet/windows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def firefox_version(self):

def close(self):
"""Closes the window"""

self.switch_to()
self.selenium.close()

Expand Down

0 comments on commit e01c7dd

Please sign in to comment.