Developer Interface¶
This part of the documentation describes the interfaces for using FoxPuppet.
FoxPuppet¶
Windows¶
This module contains all of the window types as well as the window manager.
Window Manager¶
Browser Window¶
-
class
foxpuppet.windows.browser.window.
BrowserWindow
(selenium, handle)[source]¶ Representation of a browser window.
-
close
()¶ Close the window.
-
document_element
¶ Return the inner DOM window element.
Returns: WebDriver element object for the DOM window element. Return type: WebElement
-
firefox_version
¶ Major version of Firefox in use.
Returns: Major component of the Firefox version. Return type: int
-
is_private
¶ 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
-
notification
¶ Provide access to the currently displayed notification.
Returns: FoxPuppet BaseNotification object. Return type: BaseNotification
-
open_window
(private=False)[source]¶ 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_to
()¶ Switch focus for Selenium commands to this window.
-
wait_for_notification
(notification_class=<class 'foxpuppet.windows.browser.notifications.base.BaseNotification'>)[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
-