Beispiel #1
0
 def element(self, lookup_type=wait.presence_of_element_located):
     """
     This method invokes Selenium's explicit wait method which waits until an html element is available before
     assigning it to an object.
     :param lookup_type: The style of elemental search on the page (Examples: Examples: http://selenium-python.readthedocs.org/en/latest/waits.html)
     :type lookup_type:
     :return:
     """
     if self.browser:
         web_element = WebDriverWait(self.browser, 30).until(
             lookup_type((By.XPATH, self.locator)))
         web_element._w3c = self.__uses_w3c
         return web_element