diff --git a/Framework/Built_In_Automation/Mobile/CrossPlatform/Appium/BuiltInFunctions.py b/Framework/Built_In_Automation/Mobile/CrossPlatform/Appium/BuiltInFunctions.py index de6c9f2d..9fae782b 100755 --- a/Framework/Built_In_Automation/Mobile/CrossPlatform/Appium/BuiltInFunctions.py +++ b/Framework/Built_In_Automation/Mobile/CrossPlatform/Appium/BuiltInFunctions.py @@ -1983,7 +1983,7 @@ def swipe_in_direction(data_set): direction, ) try: - appium_driver.find_element_by_android_uiautomator(final_search_string) + appium_driver.find_element(AppiumBy.ANDROID_UIAUTOMATOR, final_search_string) except: pass CommonUtil.ExecLog(sModuleInfo, "Swiped to the element successfully", 1) @@ -2657,7 +2657,7 @@ def Smart_Scroll_To_Element(data_set): return "zeuz_failed" desired_dataset = [] - inset = 0.1 + inset = 0.5 position = 0.5 height = scrollable_element.size["height"] width = scrollable_element.size["width"] @@ -5517,7 +5517,7 @@ def swipe_appium(data_set): CommonUtil.ExecLog(sModuleInfo, "Scrollable element is not found", 3) return "zeuz_failed" - inset = 0.1 + inset = 0.5 position = 0.5 height = scrollable_element.size["height"] width = scrollable_element.size["width"] @@ -5637,7 +5637,7 @@ def scroll_to_element(data_set): CommonUtil.ExecLog(sModuleInfo, "Scrollable element is not found", 3) return "zeuz_failed" desired_dataset = [] - inset = 0.1 + inset = 0.5 position = 0.5 height = scrollable_element.size["height"] width = scrollable_element.size["width"] diff --git a/Framework/Built_In_Automation/Shared_Resources/LocateElement.py b/Framework/Built_In_Automation/Shared_Resources/LocateElement.py index 0c1b4819..57285f11 100644 --- a/Framework/Built_In_Automation/Shared_Resources/LocateElement.py +++ b/Framework/Built_In_Automation/Shared_Resources/LocateElement.py @@ -17,6 +17,7 @@ from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By +from appium.webdriver.common.appiumby import AppiumBy import selenium from xml.etree.ElementTree import tostring, fromstring global WebDriver_Wait @@ -1127,7 +1128,9 @@ def auto_scroll_appium(data_set, element_query): try: # Find scrollable element differently per platform if platform == "android": - scrollable_elements = generic_driver.find_elements_by_android_uiautomator("new UiSelector().scrollable(true)") + scrollable_elements = generic_driver.find_elements( + AppiumBy.ANDROID_UIAUTOMATOR, "new UiSelector().scrollable(true)" + ) if not scrollable_elements: return [] scrollable_element = scrollable_elements[0] @@ -1136,7 +1139,7 @@ def auto_scroll_appium(data_set, element_query): # Get scroll options auto_scroll = False - inset = 0.1 + inset = 0.5 position = 0.5 max_try = 10 direction = "up"