diff --git a/src/system/perspective/__init__.py b/src/system/perspective/__init__.py index dada356..dd6beaa 100644 --- a/src/system/perspective/__init__.py +++ b/src/system/perspective/__init__.py @@ -10,6 +10,7 @@ "alterDock", "alterLogging", "authenticationChallenge", + "closeAllPopups", "closeDock", "closePage", "closePopup", @@ -151,6 +152,24 @@ def authenticationChallenge( builtins.print(sessionId, pageId, idp, forceAuth, timeout, payload, framing) +def closeAllPopups(sessionId="current_session", pageId="current_page"): + # type: (Union[str, unicode], Union[str, unicode]) -> None + """Closes all open popups on the page with the given pageId, or on + all pages in the Session with the given sessionId if no pageId is + provided. + + If neither a pageId nor a sessionId is provided, all open popups on + every page in the current Session are closed. + + Args: + sessionId: Identifier of the Session to target. If omitted, the + current Session will be used automatically. Optional. + pageId: Identifier of the page to target. If omitted, the + current page will be used automatically. Optional. + """ + builtins.print(id, sessionId, pageId) + + def closeDock( id, # type: Union[str, unicode] sessionId="current_session", # type: Union[str, unicode] diff --git a/stubs/stubs/system/perspective/__init__.pyi b/stubs/stubs/system/perspective/__init__.pyi index 2d21bf0..29382ad 100644 --- a/stubs/stubs/system/perspective/__init__.pyi +++ b/stubs/stubs/system/perspective/__init__.pyi @@ -24,6 +24,9 @@ def authenticationChallenge( payload: Optional[Dict[Union[str, unicode], Any]] = ..., framing: Union[str, unicode] = ..., ) -> None: ... +def closeAllPopups( + sessionId: Union[str, unicode] = ..., pageId: Union[str, unicode] = ... +) -> None: ... def closeDock( id: Union[str, unicode], sessionId: Union[str, unicode] = ...,