🍺 Join Clicknium for quality support, growth opportunities, and a supportive community


def wait_disappear(
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.

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.

 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.

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


from clicknium import clicknium as cc, locator

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

# wait element disappear

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


What are your feelings
Updated on 29 August 2023