示例#1
0
    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)
示例#2
0
    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)
示例#3
0
    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)