summaryrefslogtreecommitdiff
path: root/tests/testcases
diff options
context:
space:
mode:
author= <=>2019-03-14 09:12:25 -0400
committer= <=>2019-03-14 09:12:25 -0400
commitccccc4a65a5513c146fb3dd7a4f59d8c4fb0af68 (patch)
tree248f6fc4b7738ac0f9970b00497cbbbfda0ecb3d /tests/testcases
parenta9440d6cf3563c1ec5568f6d952b764cf1b4a906 (diff)
#791 iOS double tap hack. WTF
Diffstat (limited to 'tests/testcases')
-rw-r--r--tests/testcases/common.py20
-rw-r--r--tests/testcases/test.py4
2 files changed, 18 insertions, 6 deletions
diff --git a/tests/testcases/common.py b/tests/testcases/common.py
index 94fca845..ce7fe62f 100644
--- a/tests/testcases/common.py
+++ b/tests/testcases/common.py
@@ -172,17 +172,20 @@ def dbl_click_item(id=id, save_screenshot=False, save_screenshot_file=None, max_
_wait_for_id(id=id, save_screenshot=save_screenshot,
save_screenshot_file=save_screenshot_file)
element = driver.find_element_by_id(id)
+
+
+
if platform == 'android':
actions = TouchActions(driver)
actions.double_tap(element)
+
retry_count = 1
while retry_count <= max_retry:
try:
if platform == 'ios':
- # TBD fix to element
- log ('hacky ios double tap')
- driver.execute_script('mobile: doubleTap', {'x':100, 'y':100});
-
+ # Fix TBD
+ log ('Hacky iOS double tap to a fixed location')
+ driver.execute_script('mobile: doubleTap', {'x':200, 'y':200})
else:
actions.perform()
except Exception as e:
@@ -203,7 +206,14 @@ def input_item(id=id, txt="you forgot to specify text", save_screenshot=False, s
_goto_element(element)
element.clear()
element.send_keys(txt)
- driver.hide_keyboard(key_name='return')
+ '''
+ if platform == 'ios':
+ sleep(1)
+ driver.execute_script('mobile: tap', {'x':100, 'y':20})
+ sleep(1)
+ else:
+ driver.hide_keyboard()
#driver.hide_keyboard(key_name='Done')
+ '''
sleep(1)
# sleep(wait)
diff --git a/tests/testcases/test.py b/tests/testcases/test.py
index 6101dd51..4db9adef 100644
--- a/tests/testcases/test.py
+++ b/tests/testcases/test.py
@@ -56,7 +56,8 @@ class ZmninjaAndroidTests(unittest.TestCase):
'nativeWebTap': False,
'permissions': '{"com.pliablepixels.zmninja-pro": {"photos": "YES"}}',
- #'connectHardwareKeyboard': True,
+ #'connectHardwareKeyboard': False,
+ # 'sendKeyStrategy': 'grouped',
#'nativeWebScreenshot': True, # important, for screenshots
'autoAcceptAlerts': True,
'autoGrantPermissions': True # doesn't work with XCUI
@@ -149,6 +150,7 @@ class ZmninjaAndroidTests(unittest.TestCase):
#for f in files:
# os.remove(f)
+ sleep(5)
wizard.run_tests(self, isFirstRun)
isFirstRun = False
montage.run_tests(self)