diff options
| author | = <=> | 2019-03-10 17:52:40 -0400 |
|---|---|---|
| committer | = <=> | 2019-03-10 17:52:40 -0400 |
| commit | 7c173fff14dd7278a79735a73ecfd71db4814fd5 (patch) | |
| tree | c6473397d670bd712c89ac28f0cf12b0615408de /tests/testcases/app.py | |
| parent | 4553eb53f790f2a8fd178a6c28c050791e08c27c (diff) | |
appium goodness
Diffstat (limited to 'tests/testcases/app.py')
| -rw-r--r-- | tests/testcases/app.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/testcases/app.py b/tests/testcases/app.py new file mode 100644 index 00000000..b76f1edd --- /dev/null +++ b/tests/testcases/app.py @@ -0,0 +1,25 @@ +''' +App level functions for view interaction +''' + + + +import common as c + + +# tap global menu directly by invoking its controller JS +# seems reliable +def tap_menu_js(): + c.log ('Tapping menu') + c.driver.execute_script("angular.element(document.getElementById('testaut-menu-controller')).scope().openMenu();") + +# bah, in some cases this won't work, when the menu is open, +# there are two left items +# so I'm probably not going to use this +def tap_menu(): + c.log ('Tapping menu') + element = c.driver.find_element_by_id('testaut_app_menu') + element = element.find_element_by_class_name('left-buttons') + element = element.find_element_by_tag_name('button') + element.click() + |
