Skip to main content


def find_element(
locator: Union[_Locator, str],
locator_variables: dict = {},
window_mode: Literal["auto", "topmost", "noaction"] = WindowMode.Auto
) -> UiElement

Return the UI element defined by the given locator.

An alias method ui() is equivalent to clicknium.find_element().

locator[Required]: str | _Locator
locator string, the visit path of locator for target UI element, eg: '', locator store is chrome, and locator name is search_sb_form_q. 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.
window_mode: WindowMode
It defines whether to set the UI element's parent window to topmost before an action is invoked.
auto: default value, set the window to topmost by default.
topmost: always set the window to topmost
noaction: doing nothing for topmost mode

The first matched UI element with type UiElement.


from clicknium import clicknium as cc, locator, ui

searchBox = cc.find_element(
searchBox = ui(

#parametric locator
variables = {"name":"test"}
searchBox = ui(, variables)