Commit Graph

549 Commits

Author SHA1 Message Date
Jonathan Lipps
3c483ea9f8 use back() instead of finding Back element 2014-02-25 19:32:43 -08:00
Jonathan Lipps
a061bcd29b robustify test (y location can have multiple values) 2014-02-25 19:32:43 -08:00
Jonathan Lipps
f96f32048f robustify crash log test 2014-02-25 19:32:43 -08:00
Jonathan Lipps
2f86dec457 run test commands in serial rather than parallel to avoid race conditions 2014-02-25 19:32:43 -08:00
Jonathan Lipps
fe325c5cda add pre-commit hook in reset.sh 2014-02-25 12:02:56 -08:00
Jonathan Lipps
2befd7d314 fix regular chrome startup 2014-02-24 17:10:43 -08:00
Jonathan Lipps
d498d7df31 fix some failing android tests 2014-02-24 16:58:04 -08:00
Jonathan Lipps
21c9242fb6 finish android hybrid support
and refactor android webview tests to work for android as well as selendroid
2014-02-24 14:59:40 -08:00
Jonathan Lipps
cedac5d8b7 work on getting chromedriver accessing webviews 2014-02-24 14:59:39 -08:00
Jonathan Lipps
104e1a0d38 break out chromedriver into its own object
and make sure the chrome tests pass on chromium too
2014-02-24 14:59:39 -08:00
Jonathan Lipps
c60dfc59a9 fix bad space in test.sh preventing tests from running
and up launch timeout a bit
2014-02-21 15:22:56 -08:00
Jonathan Lipps
5a52db6fe5 update gappium and fix gappium app paths 2014-02-21 14:39:48 -08:00
Jonathan Lipps
55c997460a restart sim if safari dirs don't exist too, and add tests for safari caps on ios7 2014-02-20 16:17:24 -08:00
Jonathan Lipps
f1961181bc briefly pre-launch sim if sim dirs don't exist and we need to set prefs
also, unquarantine some ios6 prefs tests, and fix up some other issues
2014-02-20 16:17:23 -08:00
Jonathan Lipps
2f724235d7 add safariAllowPopups tests 2014-02-20 16:17:23 -08:00
Jonathan Lipps
0039c7294a add safarIgnoreFraudWarning cap tests 2014-02-20 16:17:23 -08:00
Jonathan Lipps
6890632937 add locationServicesAuthorized cap to pre-auth loc services for a given app 2014-02-20 16:17:23 -08:00
sebv
1a47bdab6b added non synthetic web click cap 2014-02-21 02:41:51 +08:00
Isaac Murchie
896ef10d38 Fix test for accents 2014-02-14 14:15:13 -08:00
Jonathan Lipps
6f4f275180 don't fail test if we can't find strings.xml (fix #1905)
also, make sure apidemos tests run as android even if DEVICE isn't set
2014-02-14 10:54:03 -08:00
Jonathan Lipps
d2af7968d7 add ability to scroll ios views
this works on ios7!
2014-02-13 17:38:22 -08:00
Jonathan Lipps
0de0452b75 ensure selendroid test app doesn't need to have its version updated when we update selendroid 2014-02-13 15:25:56 -08:00
Isaac Murchie
b5dbcecfaa Add exceptions to accent check 2014-02-07 17:07:44 -08:00
sebv
88479e04fa reshuffling tests 2014-02-07 12:51:20 +08:00
Jonathan Lipps
a186ff0f07 change selendroid proxy test to use a method that actually errors 2014-02-06 12:40:10 -08:00
Jonathan Lipps
67e7e79903 actually use our custom launch timeout in tests 2014-02-06 12:15:41 -08:00
Jonathan Lipps
cc1a9222f3 simply override device for selendroid rather than including in caps 2014-02-06 12:13:33 -08:00
Jonathan Lipps
2baf36939d fix gappium test app path 2014-02-06 11:56:29 -08:00
Jonathan Lipps
6bc410cffe make sure selendroid tests use selendroid (Fix #1874) 2014-02-05 13:28:44 -08:00
Jonathan Lipps
88c947de46 update selendroid to 0.8.0 2014-02-05 13:09:21 -08:00
Isaac Murchie
6daff9e810 Add app wait package 2014-02-04 15:35:58 -08:00
Isaac Murchie
f4e74a7e3e Allow for accented characters in text fields 2014-01-30 12:55:04 -08:00
sebv
968576af3d jshinting with white=true 2014-01-30 16:58:19 +08:00
sebv
714e24c789 Test reformatting, step2. 2014-01-30 16:55:47 +08:00
Jonathan Lipps
4bd07d6bfc enable basic prefs tests to pass on ios7 sim
@sebv this will probably cause merge conflicts, I tried to make it easy
to see what's going on here
2014-01-23 15:29:47 -08:00
Jonathan Lipps
82875e7531 make settings app a first-class appium-supported ios app 2014-01-23 15:20:02 -08:00
Jonathan Lipps
b49ad93c2c add tests for --force-iphone and --force-ipad 2014-01-21 19:22:31 -08:00
Jonathan Lipps
8ce088c11a make toggle test ready for appium test
- build it in reset.sh
- move test files to an appropriate dir
- add to test.sh
cc @mobiware
2014-01-21 16:31:20 -08:00
Jonathan Lipps
da0919c99c Merge pull request #1769 from mobiware/mobile-toggle
Add mobile: methods on Android: toggleData, toggleFlightMode, toggleWiFi...
2014-01-21 15:00:03 -08:00
Romain Criton
1b488f74e0 Add mobile: methods on Android: toggleData, toggleFlightMode, toggleWiFi, toggleLocationServices
Original commit message: didLaunch flag is set at the end of launch sequence

"Ping" ADB to check whether we're still connected

On Android Emulator, ADB is disconnected when we toggle Airplane Mode
or mobile Data. However, the problem does not manifest itself when
querying the list of devices via adb devices: the emulator is still
listed. After attempting to ping the emulator via a shell command, the
emulator is no longer listed and a kill-server is necessary to get ADB
back up and running

Partial recovery from a loss of ADB connection caused by turning off the data connection in the emulator

Conditionnally restart UI Automator in case of unexpected exit, mainly to address the use case of disconnecting the netwok on Android Emulator, which triggers a loss of ADB connection, and subsequently UI Automator connection

New method mobile: toggleData on Android

toggleData method on iOS

toggleFlightMode method

Make toggleData and toggleFlightMode mobile methods available for Selendroid

Fix indentation

Make sure we recover from ADB connection loss on Selendroid when disabling data on emulator

On Android emulator the ADB connection is lost when we disable the data
connection. On Android the ADB connection loss is handled by the UI
Automator exit handler, on Selendroid it must be handled in the toggle
method

Fixed indentation

Fixed ping method

Do not look for exact match in stdout

Reset uiautomatorRestartOnExit flag after we've disabled data connection

Refactor UI Automator exit handler and add a flag to completely ignore UI Automator exit

When we disconnect the network (via either disabling 3G or enabling
Flight Mode), the official Android emulator loses the ADB connection.
However, sometimes the UI Automator exit handler is not called until
the next attempt to send an ADB command. So we introduce a flag to tell
the UI automator exit handler to do nothing, i.e. neither restart UI
Automator nor uninstall the app, we take care of ADB and UI automator
reconnection before sending the next ADB command

Refactor toggleSetting code and handle ADB reconnection

Refactored the toggleSetting code in order to separate the code common
to both Android subplatforms, and code specific to either platforms
(UIAutomator and Selendroid)
Made sure UI Automator restart is handled in the toggleSetting code and
not in the UI Automator exit handler

Selendroid method for handling ADB disconnection in Emulator when turning network connection off

Right keyevent combination to position the focus on Airplane Mode checkbox for API <= 15

On Android 4.1+ (API 16+) there's a "Parent" button in the
AIRPLANE_MODE_SETTINGS Activity's ActionBar, whereas on earlier
versions there's no "Parent" button, so we need to take this into
account when performing the key sequence to position the focus on the
Airplane Mode checkbox

Generic mechanism to let each "toggle" method provide the sequence of key to position the focus

Each "toggle" mobile method may require a different sequence of keys in
order to position the focus within the corresponding Settings Activity.
Now this sequence is dynamically provided by each "toggle" method

mobile: toggleWiFi implementation

Remove blank line

mobile: toggleLocationServices implementation

When toggling LocationServices ON there's a dialog asking for user
confirmation, so we introduce a mechanism that lokks for this dialog
and acknowledge it, but if the dialog doesn't show up we proceed to
exit the settings activity

Adapt key sequence for toggleLocationServices on Android API 16

Fix bug on Kitkat when re-enabling Location Services

On Kitkat when re-entering the Location Services Activity after
disabling it, no UI element has the focus and no key press can let the
target switch grab the focus. The workaround is to make sure an element
has the focus by issuing a key press prior to opening the Location
Services activity.

Fix lint error (mixed tabs and spaces)

Fix lint error (mixed tabs and spaces)

Add comments

Spaces after if

Move variable definition

Shorten variable names

Remove dead code

Move restartAdb method to ADB (and rename to restart)

Rename rr variable to err

Android Test app for "mobile: toggle…" methods

Test script for "mobile: toggle…" methods

Refactoring of toggle test script to avoid code duplication

Adding other toggle methods

Fix lint warning

Handle an unexpected exit of logcat (for instance if ADB itself exits unexpectedly)

Make sure we can restart logcat after stoping it

Stop and restart logcat when restarting ADB

Fix UiAutomator state variable to prevent blocking when restarting UiAutomator

Refactored toggle test to allow testing on both Android and Selendroid

Get rid of the arbitrary timeout to account for ADB disconnection on emulator

When disconnecting the network connection through the "mobile: toggle"
methods, we no longer wait for an arbitrary period of time for the ADB
connection to go down.
Instead, we forcibly shut down ADB and restart it
2014-01-21 22:42:40 +00:00
Jonathan Lipps
0dceea21bb fix bug where --safari wouldn't pre-launch
and add tests
2014-01-21 14:34:38 -08:00
Jonathan Lipps
b7e706a93f allow enabling/disabling locationservices via caps 2014-01-20 16:59:55 -08:00
Jonathan Lipps
dba5e7393b fix pre-launch bug (fix #1772)
and add tests
2014-01-20 12:43:30 -08:00
Jonathan Lipps
3b0d9b49dd reverse test assumption (cc @sebv) 2014-01-17 13:42:31 -08:00
Jonathan Lipps
4d7cac55c9 fix test, this is what i get for using another editor 2014-01-17 12:24:42 -08:00
Jonathan Lipps
0b66158074 make ios tests a bit more robust 2014-01-17 11:39:03 -08:00
Jonathan Lipps
50ad1d0c42 add test for app backgrounding to android/selendroid 2014-01-17 10:57:00 -08:00
Jonathan Lipps
a9841062e0 fix selendroid app launch issues
require a dot for a relative activity, otherwise we consider it a full one
2014-01-13 15:54:16 -08:00
sebv
6695dfe5fb Refactored tests to use wd promise-chain api 2014-01-14 04:31:19 +08:00
Jonathan Lipps
44b8ed86e0 actually allow removeApp to work with selendroid (fix #1686 for real) 2014-01-10 09:00:51 -08:00