def when_present(self, timeout=5): """ Waits for element to be present on the current page. Args: timeout (integer): seconds to wait before throwing exception. """ self.wait_until(element_predicate(self, 'exists'), timeout)
def when_visible(self, timeout=5): """ Waits for element to be visible on the current page. Args: timeout (integer): seconds to wait before throwing exception. """ self.wait_until(element_predicate(self, 'is_visible'), timeout)
def when_enabled(self, timeout=5): """ Waits for element to be enabled on the current page. Args: timeout (integer): seconds to wait before throwing exception. """ self.wait_unitl(element_predicate(self, 'is_enabled'), timeout)