Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"]
Expand Down Expand Up @@ -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"]
Expand Down Expand Up @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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"
Expand Down
Loading