Пример #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()
Пример #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)
Пример #3
0
 def swipe_down(swipe_percent=50):
     return Searcher.swipe_down(swipe_percent)
Пример #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)
Пример #6
0
 def long_press_on_element(element, time_to_hold=3):
     Searcher.long_press_on_element(element.get_element(), time_to_hold)
Пример #7
0
 def tap_on(x, y):
     Searcher.tap_on(x, y)
Пример #8
0
 def click_search_button_on_keyboard():
     Searcher.click_search_button()
Пример #9
0
 def back():
     Searcher.back()
Пример #10
0
 def decrease_volume_by_device_button(taps_quantity):
     for i in range(taps_quantity):
         Searcher.decrease_volume_by_device_button()
Пример #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)
Пример #14
0
 def swipe_right():
     Searcher.swipe_right()
Пример #15
0
 def is_alert_present():
     return Searcher.is_alert_present()
Пример #16
0
 def swipe_left():
     Searcher.swipe_left()
Пример #17
0
 def get_alert_text():
     return Searcher.get_alert_text()
Пример #18
0
 def tap_on_screen_center():
     Searcher.tap_on_screen_center()
Пример #19
0
 def alert_accept():
     Searcher.alert_accept()
Пример #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)
Пример #21
0
 def alert_decline():
     Searcher.alert_decline()
Пример #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