Beispiel #1
0
 def select_element(driver, element):
     return Find(driver).select_element(element)
Beispiel #2
0
 def find_element_and_click(driver, locator):
     try:
         Find(driver).find_web_element(locator[0], locator[1]).click()
     except WebDriverException as Retry:
         sleep(2)
         Find(driver).find_web_element(locator[0], locator[1]).click()
Beispiel #3
0
 def find_element(driver, locator):
     return Find(driver).find_web_element(locator[0], locator[1])
Beispiel #4
0
 def drag_element_to_point(driver, locator, point):
     element = Find(driver).find_web_element(locator[0], locator[1])
     ActionChains(driver).click_and_hold(element).move_by_offset(
         point[0], point[1]).release().perform()
Beispiel #5
0
 def find_elements(driver, locator, until_number):
     return Find(driver).find_web_elements(locator[0],
                                           locator[1],
                                           until_number=until_number)
Beispiel #6
0
 def find_element_and_return_class(driver, locator):
     return Find(driver).find_web_element(locator[0],
                                          locator[1]).get_attribute('class')
Beispiel #7
0
 def find_element_and_input(driver, locator, input_value):
     Find(driver).find_web_element(locator[0], locator[1]).clear()
     Find(driver).find_web_element(locator[0],
                                   locator[1]).send_keys(input_value)