Skip to main content

restore

def restore( self, locator: Union[_Locator, str], locator_variables: dict = {}, timeout: int = 30 ) -> None

Restore the window specified by locator.
Notes: The locator should be recorded using UIA technology, role is window, for example:
window locator

Parameters:
locator[Required]: str | _Locator
Locator string, the visit path of locator for target window element, eg: 'locator.explorer.window_downloads', locator store is explorer, and locator name is window_downloads. For more details, please refer to Locator.
locator_variables: dict
Locator variables, set to initialize parameters in locator, eg: { "row": 1, "column": 1}, more about variables, please refer to Parametric Locator.
timeout: int
Timeout for the operation, the unit is second, and the default value is 30 seconds.

Returns:
None

Example:


from clicknium import clicknium as cc

# get window driver
window_driver = cc.window

# restore window
window_driver.restore("locator.notepad.window_notitle_notepad")

# parametric locator
variables = {"name":"test"}
window_driver.restore("locator.notepad.window_notitle_notepad", variables)