Skip to main content

set_focus

def set_focus(self, timeout: int = 30) -> None

Set the target element to focused state.

Parameters:
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, locator, ui

ui(locator.chrome.bing.search_sb_form_q).set_focus()