BrowserTab.wait_disappear

def wait_disappear(
self,
locator: Union[_Locator, str],
locator_variables: dict = {},
wait_timeout: int = 30
) -> bool

Wait for the specified element of the web page to disappear within given timeout.

Remarks:
BrowserTab.wait_disappear is different with clicknium.wait_disappear when locating the UI element.

  • clicknium.wait_disappear() is for both web and window uielement, and not limited to a specific scope.
  • clicknium.chrome.open("https://bing.com").wait_disappear() will locate element in its parent web page.

Parameters:
locator[Required]: str | _Locator
   Locator string, the visit path of locator for target UI element, eg: ‘locator.chrome.bing.search_sb_form_q’, 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.
wait_timeout: int
   Wait timeout for the operation, the unit is second, default value is 30 seconds.

Returns:
 bool, return True if the element disappears within given timeout otherwise return False.

Example:


from clicknium import clicknium as cc, locator

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

# wait element disappear
chrome_tab.wait_disappear(locator.chrome.bing.search_sb_form_q)

# parametric locator
variables = {"name":"test"}
chrome_tab.wait_disappear(locator.chrome.bing.search_sb_form_v, variables)

Previouswait_appear_by_css_selectorNextwait_disappear_by_xpath

What are your feelings
Updated on 29 August 2023