Commit Graph

38 Commits

Author SHA1 Message Date
Isaac Murchie
5ae62f983e Fix touch actions below API 18 2014-05-14 13:13:31 -07:00
bootstraponline
1b255378ab Discard NotImportantViews only for XPath & DumpWindow
When setCompressedLayoutHeirarchy is enabled, views not marked as important to accessibility are discarded. This must be enabled for XPath and page source to work. If it's left enabled then it's not possible to find unimportant elements via other locator strategies.

If discard is toggled back to false at the end of an XPath request it will break XPath. To safely set discard to false, the code waits for the next find request that doesn't use XPath.

Thanks @paymand for figuring out how to make this work!
2014-05-13 12:48:37 -04:00
Ruben Gonzalez Alonso
be347e9257 Check updateStrings errors and improve parseLocalizableStrings in iOS 2014-05-13 09:59:24 +02:00
Ruben Gonzalez Alonso
858b4a30e9 Add optional argument 'language' to getStrings in Android and Selendroid 2014-05-13 09:58:05 +02:00
bootstraponline
37b4b667f0 Always setCompressedLayoutHeirarchy 2014-05-12 15:14:31 -04:00
bootstraponline
4dc4df3368 Restore API check for setCompressedLayoutHeirarchy 2014-05-08 12:41:58 -04:00
Jonathan Lipps
0704d6a83c Merge pull request #2503 from imurchie/isaac-unicode
Allow for encoding of non-ASCII text in Android
2014-05-08 05:50:45 -07:00
Isaac Murchie
2bcc775b01 Allow for encoding of non-ASCII text in Android 2014-05-07 15:55:56 -07:00
bootstraponline
74a233b6e8 Fix compressXml
The old compressXml did not presist across uiautomator sessions.
By requesting 'DumpWindowHierarchyCompressed' it ensures the result is
always compressed, even if the server had been restarted.

For some reason if compressXml is disabled then the xpath index on Android
will return the wrong result.
2014-05-07 15:23:18 -04:00
bootstraponline
bda81ba78e Remove dead code 2014-05-05 22:26:59 -04:00
bootstraponline
fc35a190ca Improve DumpWindowHierarchy.java 2014-04-28 18:28:00 -04:00
Jonathan Lipps
9fd48fb9f8 get rid of native tag name in favor of class name 2014-04-18 11:31:49 -07:00
Isaac Murchie
ec28b95468 Allow android multi touch actions without an element 2014-04-14 11:04:25 -07:00
Jonathan Lipps
e2c6a9919b remove json page source in favor of xml
and fix a bug in android bootstrap's xpath that snuck in last time
2014-04-09 18:07:02 -07:00
Jonathan Lipps
958aac7e09 remove old xpath support and promote -real xpath to xpath 2014-04-09 16:15:54 -07:00
Isaac Murchie
0df0d2b2dc Add touch and multitouch actions for Android 2014-04-07 12:13:16 -07:00
jonahss
ff30a5288b -android uiautomator locator strategy 2014-04-02 14:27:49 -07:00
Jonathan Lipps
ec563bd2b8 add real xpath support for android
- relies on xpath support for ios pull request
- adds support under the '-real xpath' locator strategy
- deprecates the original xpath strategy, which will be replaced in 1.0
- because we have no way to get a dom fragment starting from an element,
  this strategy will only work for root-level queries
2014-03-28 10:29:48 -07:00
jonahss
878497d63f accessibility_id -> accessibility id 2014-03-27 15:05:17 -07:00
Dylan Lacey
9a7594870c Added deprecation warning for tag name
Add deprecation warnings for class name, tag name locator strategies.

Deprecations warnings will now be thrown for:
* 'tag name' in the native context
* 'class name' in the native context
* 'class name' in the web context

'class_name' is now a valid locator strategy for checkValidLocStrat

Add test for new class name locator
rename createCommand createGetElementCommand
Adding unit tests for new exception throwing
Add test for incorrect UIA class names
2014-03-25 18:07:02 -07:00
jonahss
273a008b95 add accessibility_id loc strat 2014-03-24 11:11:04 -07:00
jonahss
ae670caf88 Fixed a bug where requesting an invalid locator strategy on android caused uiautomator to die unexpectedly. Added a test 2014-03-21 15:46:25 -07:00
jonahss
6b0e9708ab add -ios_uiautomation locator strategy 2014-03-21 15:44:09 -07:00
bootstraponline
fb71904570 Format java according to bootstrap/.settings 2014-03-21 11:14:49 -04:00
bootstraponline
17e3fc3edb Prevent leaking state across executions 2014-03-21 11:05:50 -04:00
Payman Delshad
60dae83db1 Fixup for #2085. set isElement to false if getElement() throws. 2014-03-21 11:30:52 +01:00
bootstraponline
d70f8ac01d Clean up debug logging 2014-03-07 15:10:53 +01:00
Payman Delshad
113fe5ce10 Added support for touch{Down|Up|Move} on Android. 2014-03-07 15:10:52 +01:00
Jonathan Lipps
f0193f3e26 Merge pull request #1970 from bootstraponline/source_fix
Fix Android page source
2014-02-27 13:20:26 -08:00
bootstraponline
cce7ee0126 Android longClick x, y, and duration support
Ruby examples:

mobile :longClick, element: el.ref

mobile :longClick, element: el.ref, duration: 3000

mobile :longClick, x: 400, y: 297, duration: 3000

mobile :longClick, x: 0.5, y: 0.244
2014-02-27 16:18:05 -05:00
bootstraponline
591c0dbc4e Fix Android page source 2014-02-27 10:19:50 -05:00
Payman Delshad
b0976fece8 Android: Added support for 'direction' to scrollTo.
This fix adds a new option (direction) to 'mobile: scrollTo'.
If 'horizontal' is provided (or if the view is a HorizontalScrollView),
we will call setAsHorizontalList() before commencing the scroll.
2014-02-26 15:44:39 +01:00
bootstraponline
afa2928ddf Fix long click on Android
Android's uiautomator has a broken long click implementation.
uiautomator will not pause long enough on long click which causes Android to detect the long click as a normal click.

This fix uses reflection to access uiautomator's private touchDown/touchUp methods to reimplement longClick correctly.

In theory I should be able to obtain a reference to android.app.UiAutomation without using reflection. However this doesn't seem possible when using uiautomator. getInstrumentation().getUiAutomation(); doesn't work because we're not using instrumentation.
2014-01-31 16:31:06 -05:00
rockbot
5d88a0eb48 Improves error handling in bootstrap's find.java (fixes #1549) 2014-01-03 11:52:26 -08:00
bootstraponline
f1f40fd66a Fix app not responding 2013-12-26 14:01:01 -05:00
Payman Delshad
36427cf6d1 Support for getClassName() from Android API level 18. 2013-10-21 13:40:31 +02:00
Saikat Maitra
00379af68d Fixed bootstrap build error to download dependencies
Below is error message. 

[ERROR] Failed to execute goal on project bootstrap: Could not resolve dependencies for project io.appium.android:bootstrap:jar:1.0.0-SNAPSHOT: The following artifacts could not be resolved: android:android:jar:4.3_r1, android.test.uiautomator:uiautomator:jar:4.3_r1: Could not find artifact android:android:jar:4.3_r1 in central (http://repo1.maven.org/maven2) -> [Help 1]
2013-10-18 17:57:14 +05:30
Jonathan Lipps
5ad5df488b move all android-related files together into devices/android 2013-10-17 12:33:49 -07:00