cfme.utils.browser module¶
Core functionality for starting, restarting, and stopping a selenium browser.
-
cfme.utils.browser.
ScreenShot
¶ alias of
cfme.utils.browser.screenshot
-
class
cfme.utils.browser.
WithZoom
(level)[source]¶ Bases:
object
This class is a decorator that used to wrap function with zoom level. this class perform zoom by <level>, call the target function and exit by zooming back to the original zoom level.
- Parameters
level (*) – int, the zooming value (i.e. -2 -> 2 clicks out; 3 -> 3 clicks in)
-
cfme.utils.browser.
browser
()[source]¶ callable that will always return the current browser instance
If
None
, no browser is running.- Returns
The current browser instance.
-
cfme.utils.browser.
ensure_browser_open
(url_key=None)[source]¶ Ensures that there is a browser instance currently open
Will reuse an existing browser or start a new one as-needed
- Returns
The current browser instance.
-
cfme.utils.browser.
quit
()[source]¶ Close the current browser
Will silently fail if the current browser can’t be closed for any reason.
Note
If a browser can’t be closed, it’s usually because it has already been closed elsewhere.