Beispiel #1
0
def preparation():
    for cone in range(Properties.get_cones().get_size()):
        Properties.get_cones().get_by_number(
            cone).get_comms_remote().uncluster()
        Properties.get_cones().get_by_number(
            cone).get_comms_remote().wait_for_unclustering()
        if Properties.if_ios():
            DeviceInstaller.uninstall_app_by_name()
    yield
    Searcher.reset_driver()
Beispiel #2
0
 def swipe_down_from_element(element,
                             swipe_percent=50,
                             timeout=1,
                             prim_timeout=0):
     return Searcher.swipe_down_from_element(element.locator, swipe_percent,
                                             timeout, prim_timeout)
Beispiel #3
0
 def swipe_down(swipe_percent=50):
     return Searcher.swipe_down(swipe_percent)
Beispiel #4
0
 def swipe_up(swipe_percent=50):
     return Searcher.swipe_up(swipe_percent)
 def get_elements(self):
     """:rtype: list of appium.webdriver.webelement.WebElement"""
     return Searcher.find_elements(self.locator)
Beispiel #6
0
 def long_press_on_element(element, time_to_hold=3):
     Searcher.long_press_on_element(element.get_element(), time_to_hold)
Beispiel #7
0
 def tap_on(x, y):
     Searcher.tap_on(x, y)
Beispiel #8
0
 def click_search_button_on_keyboard():
     Searcher.click_search_button()
Beispiel #9
0
 def back():
     Searcher.back()
Beispiel #10
0
 def decrease_volume_by_device_button(taps_quantity):
     for i in range(taps_quantity):
         Searcher.decrease_volume_by_device_button()
Beispiel #11
0
 def _decrease_volume_by_application_button(taps_quantity):
     for i in range(taps_quantity):
         Searcher.decrease_volume_by_application_button()
 def is_clickable(self, time_to_wait=10):
     return Searcher.is_element_clickable(self.locator, time_to_wait)
 def is_presented(self, time_to_wait=10):
     return Searcher.is_element_presented(self.locator, time_to_wait)
Beispiel #14
0
 def swipe_right():
     Searcher.swipe_right()
Beispiel #15
0
 def is_alert_present():
     return Searcher.is_alert_present()
Beispiel #16
0
 def swipe_left():
     Searcher.swipe_left()
Beispiel #17
0
 def get_alert_text():
     return Searcher.get_alert_text()
Beispiel #18
0
 def tap_on_screen_center():
     Searcher.tap_on_screen_center()
Beispiel #19
0
 def alert_accept():
     Searcher.alert_accept()
Beispiel #20
0
 def _move_element_to_element(from_element, to_element, time_to_hold=3):
     Searcher.long_press_to_element_and_move_to_other_element(
         from_element.get_element(), to_element.get_element(), time_to_hold)
Beispiel #21
0
 def alert_decline():
     Searcher.alert_decline()
Beispiel #22
0
 def put_app_in_background(time_idle):
     Searcher.put_app_in_background(time_idle)
 def get_element(self):
     """:rtype: appium.webdriver.webelement.WebElement"""
     self.element = Searcher.find_element(self.locator)
     return self.element