fortrace.utility.applications.web_browsers package
Submodules
fortrace.utility.applications.web_browsers.edge module
- class fortrace.utility.applications.web_browsers.edge.Edge(qs: QEMUMonitorSession, parent_notifier: ParentNotifier)[source]
Bases:
GenericWebBrowserEdge Web browser.
fortrace.utility.applications.web_browsers.firefox module
- class fortrace.utility.applications.web_browsers.firefox.Firefox(qs: QEMUMonitorSession, parent_notifier: ParentNotifier)[source]
Bases:
GenericWebBrowserFirefox Web browser.
fortrace.utility.applications.web_browsers.web_browser module
- class fortrace.utility.applications.web_browsers.web_browser.GenericWebBrowser(name: str, qs: QEMUMonitorSession, parent_notifier: ParentNotifier)[source]
Bases:
GenericApplicationRepresentation of a generic Web browser, providing basic functionality.
- property active_tab
- browse_to_url(url: str | Url, new_tab: bool = False)[source]
Browse to the provided URL or download file behind URL
If you provide the URL pointing directly to the file, most browsers will download it.
- Parameters:
url – to destination url #TODO: check whether str is needed
new_tab – open it in a new tab. If yes, the focus will be on the new tab
- focus_tab(url: str)[source]
Set focus on tab.
- Parameters:
url – the url of the tab to be focused (the parameter is matched against all members of _active_tabs. The
selected) (first substring match is)
- save(destination: PathLike | None = None, name: str | None = None)[source]
Save the current page.
- Parameters:
destination – path to save file to (defaults to downloads directory)
name – can be provided if the file should be renamed
- start_web_search(search_terms: str, search_engine: Literal['Google', 'Bing', 'DuckDuckGo'] | None = None)[source]
Start a web search from the address bar (as search engine can be specified there).
- Parameters:
search_terms – the terms to search
search_engine – which search engine to use (None for browser default)
fortrace.utility.applications.web_browsers.web_browser_factory module
- fortrace.utility.applications.web_browsers.web_browser_factory.get_web_browser(name: str, qs: QEMUMonitorSession, parent_notifier: ParentNotifier) GenericWebBrowser[source]
Factory to create a specific web browser application object.
- Parameters:
name – name of the application (if not included ValueError is thrown)
qs – handle to QEMUMonitor
parent_notifier – attribute of desktop environment to handle changes in windows
- Returns:
Application handle to opened web browser