def wait_until_clickable(self, driver, elem_id, by=By.ID, timeout=10):
"""
Wait for the modal to be shown.
:param driver: Selenium driver instance
:type driver: selenium.webdriver.remote.webdriver.WebDriver
:param elem_id: element ID
:type elem_id: str
:param by: What method to use to find the element. This must be one of
the strings which are values of
:py:class:`selenium.webdriver.common.by.By` attributes.
:type by: str
:param timeout: timeout in seconds
:type timeout: int
"""
WebDriverWait(driver, timeout).until(
EC.element_to_be_clickable((by, elem_id))
)
评论列表
文章目录