WebElement.set property

def set_property(
self,
name: str,
value: str,
timeout: int = 30
) -> None

Set the property value of the web element.

Parameters:
name[Required]: str
   Property name, different UI elements may support different properties. Please refer to Automation Concepts to check the properties according to the UI element types.
value[Required]: str
   Property value.
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

chrome_tab = cc.chrome.open("https://bing.com")

# set the web propery with specified value
chrome_tab.find_element(locator.chrome.bing.search_sb_form_q).set_property("tag", "search_tag")

Previousfind_elements_by_css_selectorNextexecute_js

What are your feelings
Updated on 29 August 2023