Skip to main content


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

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.



from clicknium import clicknium as cc

# get window driver
window_driver = cc.window

# restore window

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