appium_lib 3.0.3 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/android_tests/Rakefile +0 -3
- data/android_tests/appium.txt +1 -0
- data/android_tests/lib/android/specs/android/element/alert.rb +9 -2
- data/android_tests/lib/android/specs/android/element/textfield.rb +5 -0
- data/android_tests/lib/android/specs/android/helper.rb +6 -15
- data/android_tests/lib/android/specs/android/patch.rb +16 -3
- data/android_tests/lib/android/specs/common/device.rb +41 -41
- data/android_tests/lib/android/specs/common/patch.rb +1 -1
- data/android_tests/lib/android/specs/common/web_context.rb +55 -7
- data/android_tests/lib/android/specs/driver.rb +4 -3
- data/android_tests/lib/android/specs/install.rb +25 -0
- data/android_tests/lib/run.rb +4 -3
- data/docs/android_docs.md +357 -187
- data/docs/docs.md +8 -28
- data/docs/ios_docs.md +341 -179
- data/docs/migration.md +6 -0
- data/ios_tests/Rakefile +0 -3
- data/ios_tests/appium.txt +1 -0
- data/ios_tests/lib/common.rb +30 -0
- data/ios_tests/lib/ios/specs/device/device.rb +6 -1
- data/ios_tests/lib/ios/specs/driver.rb +3 -3
- data/ios_tests/lib/ios/specs/ios/element/alert.rb +0 -5
- data/ios_tests/lib/ios/specs/ios/element/textfield.rb +10 -0
- data/ios_tests/lib/run.rb +4 -106
- data/lib/appium_lib.rb +2 -2
- data/lib/appium_lib/android/element/button.rb +16 -26
- data/lib/appium_lib/android/element/generic.rb +15 -12
- data/lib/appium_lib/android/helper.rb +39 -53
- data/lib/appium_lib/common/patch.rb +10 -39
- data/lib/appium_lib/common/version.rb +2 -2
- data/lib/appium_lib/device/device.rb +54 -70
- data/lib/appium_lib/driver.rb +29 -19
- data/lib/appium_lib/ios/helper.rb +50 -1
- data/lib/appium_lib/ios/patch.rb +1 -23
- data/release_notes.md +38 -0
- metadata +4 -4
- data/android_tests/lib/android/specs/android/dynamic.rb +0 -5
- data/lib/appium_lib/android/dynamic.rb +0 -47
data/lib/appium_lib/ios/patch.rb
CHANGED
@@ -34,29 +34,7 @@ because swiping to dismiss works only if such key doesn't exist.
|
|
34
34
|
=end
|
35
35
|
# type
|
36
36
|
$driver.execute_script %(au.getElement('#{self.ref}').setValue('#{text}');)
|
37
|
-
|
38
|
-
$driver.ignore {
|
39
|
-
# wait 5 seconds for a wild keyboard to appear. if the textfield is disabled
|
40
|
-
# then setValue will work, however the keyboard will never display
|
41
|
-
# because users are normally not allowed to type into it.
|
42
|
-
$driver.wait_true(5) do
|
43
|
-
$driver.execute_script %(au.mainApp().keyboard().type() !== 'UIAElementNil')
|
44
|
-
end
|
45
|
-
|
46
|
-
# dismiss keyboard
|
47
|
-
js = <<-JS
|
48
|
-
if (au.mainApp().keyboard().type() !== "UIAElementNil") {
|
49
|
-
au.hideKeyboard('Done');
|
50
|
-
}
|
51
|
-
JS
|
52
|
-
|
53
|
-
$driver.execute_script js
|
54
|
-
|
55
|
-
# wait 5 seconds for keyboard to go away
|
56
|
-
$driver.wait_true(5) do
|
57
|
-
$driver.execute_script %(au.mainApp().keyboard().type() === 'UIAElementNil')
|
58
|
-
end
|
59
|
-
}
|
37
|
+
$driver.hide_ios_keyboard
|
60
38
|
end # def type
|
61
39
|
end # Selenium::WebDriver::Element.class_eval
|
62
40
|
end # def patch_webdriver_element
|
data/release_notes.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1
|
+
#### v4.0.0 2014-07-05
|
2
|
+
|
3
|
+
- [8cc004a](https://github.com/appium/ruby_lib/commit/8cc004ad04ec087a8a11c06ca0749a5e2c6586a7) Release 4.0.0
|
4
|
+
- [e8c52c6](https://github.com/appium/ruby_lib/commit/e8c52c67226c94689c715a87ec7cee49c20c0821) Add note to android install test
|
5
|
+
- [e5b3939](https://github.com/appium/ruby_lib/commit/e5b3939068f3fcd65ecd04f3f6fdd8652a159c43) Update install test on Android
|
6
|
+
- [e02498c](https://github.com/appium/ruby_lib/commit/e02498c59272a173aed2eca662ef0c38539b6b24) Fix #152
|
7
|
+
- [b9db60f](https://github.com/appium/ruby_lib/commit/b9db60fc686c190561d352689dbdd410f1a42123) Reset parser before/after parsing
|
8
|
+
- [9c4672b](https://github.com/appium/ruby_lib/commit/9c4672ba9e5912d7a7aee0b80c78144295c0d5a0) Add instance numbers to page output on Android
|
9
|
+
- [de5732d](https://github.com/appium/ruby_lib/commit/de5732d598ce9639dd18f4764971000f536833ab) Fix #224
|
10
|
+
- [a206270](https://github.com/appium/ruby_lib/commit/a2062703fbcc2ebe0a80731034aee5d8bfb86108) Fix android device test
|
11
|
+
- [9838d6a](https://github.com/appium/ruby_lib/commit/9838d6a5d910632a96df906c8d15a6084be97ea2) Move context tests to web_context.rb
|
12
|
+
- [d6faefa](https://github.com/appium/ruby_lib/commit/d6faefaa2f18162076a0966b44b2b491f36a7504) Fix common/patch test
|
13
|
+
- [414c4de](https://github.com/appium/ruby_lib/commit/414c4dea9de1404badf301c52142c75ba1125022) Update common/device test for Android L
|
14
|
+
- [ccfb38d](https://github.com/appium/ruby_lib/commit/ccfb38d812d09cfbefcb77a404e9b3bbcbb6a237) Update android/helper for Android L
|
15
|
+
- [24b75d7](https://github.com/appium/ruby_lib/commit/24b75d70f52cf5e2fe090086ed2ee5280cb572bd) Update alert tests for Android L
|
16
|
+
- [8e9c7da](https://github.com/appium/ruby_lib/commit/8e9c7da4bf9ce44ab990da3ea9af9770aeac5c81) Fix #227
|
17
|
+
- [596f6e0](https://github.com/appium/ruby_lib/commit/596f6e0e0cd6fe6e2b7f878517db46aedb45b716) Fix #223
|
18
|
+
- [bcd9934](https://github.com/appium/ruby_lib/commit/bcd99340038fa30a3180e673757282b8e40b828f) Add predicate textfield test for iOS
|
19
|
+
- [27732f4](https://github.com/appium/ruby_lib/commit/27732f4c6ebfbb0400419d90ca91528e0861bd68) Merge pull request #225 from appium/remove_complex_find
|
20
|
+
- [3424d64](https://github.com/appium/ruby_lib/commit/3424d64bed8f641a67316c8a52e35f0b9ae7b75d) Remove complex_find. Update tests
|
21
|
+
- [e2c82cc](https://github.com/appium/ruby_lib/commit/e2c82cc95d1443a31f73871fce96ae8aa4e99b6f) Add hide_keyboard for Android. Use custom for iOS
|
22
|
+
- [27a25ba](https://github.com/appium/ruby_lib/commit/27a25baf936271203d13123386a2544b040d9a38) Update hide_keyboard for iOS
|
23
|
+
- [e952bb0](https://github.com/appium/ruby_lib/commit/e952bb0d1287ebdd42254258e749136ed662b5f9) Test pull_folder on iOS & Android
|
24
|
+
- [515e288](https://github.com/appium/ruby_lib/commit/515e28853607c729e6c58252dbe5e90e23b49e1d) available_contexts returns [] instead of nil on error
|
25
|
+
- [86b378e](https://github.com/appium/ruby_lib/commit/86b378e7cf6cea86e2f88a342ab7b19f0cb455a8) Add pull_folder support
|
26
|
+
- [0b3e0cf](https://github.com/appium/ruby_lib/commit/0b3e0cf2e4c5c8d674385e8a573a70d7c1ce3068) Add open_notifications. Fix #210
|
27
|
+
- [05125b4](https://github.com/appium/ruby_lib/commit/05125b41dd4957c841fcb51566e07905b04bbd0c) Update migration.md
|
28
|
+
- [235e1c0](https://github.com/appium/ruby_lib/commit/235e1c0dc9a93efb6defff27cfebf527784a3ba7) Replace keyevent with press_keycode. Add long_press_keycode
|
29
|
+
- [64d9db1](https://github.com/appium/ruby_lib/commit/64d9db11152e46845b2a055bba97cc6d45edf413) Use one run.rb for all platforms
|
30
|
+
- [335100e](https://github.com/appium/ruby_lib/commit/335100e8027a01bd46842111752d83f6fe3fe9de) Move iOS helpers to common.rb
|
31
|
+
- [ab915cf](https://github.com/appium/ruby_lib/commit/ab915cfa92981afd628569cf7e85517c6e4aec97) Update driver opts
|
32
|
+
- [b495c5e](https://github.com/appium/ruby_lib/commit/b495c5e0bf591c98c733d4636e3c31848857f8c2) Merge pull request #211 from kieferrm/patch-1
|
33
|
+
- [543f8f3](https://github.com/appium/ruby_lib/commit/543f8f38763bec0d468dcadb3c4a6facf734e569) change require to lower case
|
34
|
+
- [c54eaa1](https://github.com/appium/ruby_lib/commit/c54eaa1d78ed70bdf89405fac30d4129d9734a92) Remove global
|
35
|
+
- [ee5a076](https://github.com/appium/ruby_lib/commit/ee5a07624314095148c6203bfe56454efc268891) Update docs.md
|
36
|
+
- [a581424](https://github.com/appium/ruby_lib/commit/a5814249c8123c0309599847c0d0a9145c9ef819) Clean up cucumber doc
|
37
|
+
|
38
|
+
|
1
39
|
#### v3.0.3 2014-06-02
|
2
40
|
|
3
41
|
- [3ed875c](https://github.com/appium/ruby_lib/commit/3ed875cc01ba7f670e9b1b8ccfd7b7adb0af82c1) Release 3.0.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -223,7 +223,6 @@ files:
|
|
223
223
|
- android_tests/api.apk
|
224
224
|
- android_tests/appium.txt
|
225
225
|
- android_tests/flaky.txt
|
226
|
-
- android_tests/lib/android/specs/android/dynamic.rb
|
227
226
|
- android_tests/lib/android/specs/android/element/alert.rb
|
228
227
|
- android_tests/lib/android/specs/android/element/button.rb
|
229
228
|
- android_tests/lib/android/specs/android/element/generic.rb
|
@@ -238,6 +237,7 @@ files:
|
|
238
237
|
- android_tests/lib/android/specs/common/version.rb
|
239
238
|
- android_tests/lib/android/specs/common/web_context.rb
|
240
239
|
- android_tests/lib/android/specs/driver.rb
|
240
|
+
- android_tests/lib/android/specs/install.rb
|
241
241
|
- android_tests/lib/format.rb
|
242
242
|
- android_tests/lib/run.rb
|
243
243
|
- android_tests/readme.md
|
@@ -299,6 +299,7 @@ files:
|
|
299
299
|
- ios_tests/appium.txt
|
300
300
|
- ios_tests/data/unicode.txt
|
301
301
|
- ios_tests/flaky.txt
|
302
|
+
- ios_tests/lib/common.rb
|
302
303
|
- ios_tests/lib/format.rb
|
303
304
|
- ios_tests/lib/ios/specs/common/element/window.rb
|
304
305
|
- ios_tests/lib/ios/specs/common/helper.rb
|
@@ -321,7 +322,6 @@ files:
|
|
321
322
|
- ios_tests/upload/sauce_storage.rb
|
322
323
|
- ios_tests/upload/upload.rb
|
323
324
|
- lib/appium_lib.rb
|
324
|
-
- lib/appium_lib/android/dynamic.rb
|
325
325
|
- lib/appium_lib/android/element/alert.rb
|
326
326
|
- lib/appium_lib/android/element/button.rb
|
327
327
|
- lib/appium_lib/android/element/generic.rb
|
@@ -1,47 +0,0 @@
|
|
1
|
-
module Appium
|
2
|
-
class Driver
|
3
|
-
# http://developer.android.com/tools/help/uiautomator/UiSelector.html
|
4
|
-
@@map = {
|
5
|
-
1 => ['text(String text)', 'SELECTOR_TEXT', 1],
|
6
|
-
2 => ['textStartsWith(String text)', 'SELECTOR_START_TEXT', 2],
|
7
|
-
3 => ['textContains(String text)', 'SELECTOR_CONTAINS_TEXT', 3],
|
8
|
-
4 => ['className(String className)', 'SELECTOR_CLASS', 4],
|
9
|
-
5 => ['description(String desc)', 'SELECTOR_DESCRIPTION', 5],
|
10
|
-
6 => ['descriptionStartsWith(String desc)', 'SELECTOR_START_DESCRIPTION', 6],
|
11
|
-
7 => ['descriptionContains(String desc)', 'SELECTOR_CONTAINS_DESCRIPTION', 7],
|
12
|
-
8 => ['index(final int index)', 'SELECTOR_INDEX', 8],
|
13
|
-
9 => ['instance(final int instance)', 'SELECTOR_INSTANCE', 9],
|
14
|
-
10 => ['enabled(boolean val)', 'SELECTOR_ENABLED', 10],
|
15
|
-
11 => ['focused(boolean val)', 'SELECTOR_FOCUSED', 11],
|
16
|
-
12 => ['focusable(boolean val)', 'SELECTOR_FOCUSABLE', 12],
|
17
|
-
13 => ['scrollable(boolean val)', 'SELECTOR_SCROLLABLE', 13],
|
18
|
-
14 => ['clickable(boolean val)', 'SELECTOR_CLICKABLE', 14],
|
19
|
-
15 => ['checked(boolean val)', 'SELECTOR_CHECKED', 15],
|
20
|
-
16 => ['selected(boolean val)', 'SELECTOR_SELECTED', 16],
|
21
|
-
# // SELECTOR_ID = 17; // nothing.
|
22
|
-
18 => ['packageName(String name)', 'SELECTOR_PACKAGE_NAME', 18],
|
23
|
-
# // SELECTOR_CHILD = 19; // childSelector(UiSelector selector)
|
24
|
-
# // SELECTOR_CONTAINER = 20; // containerSelector(UiSelector selector)
|
25
|
-
# // SELECTOR_PATTERN = 21; // ! private ! patternSelector(UiSelector selector)
|
26
|
-
# // SELECTOR_PARENT = 22; // fromParent(UiSelector selector)
|
27
|
-
# // SELECTOR_COUNT = 23; // nothing.
|
28
|
-
24 => ['longClickable(boolean val)', 'SELECTOR_LONG_CLICKABLE', 24],
|
29
|
-
25 => ['textMatches(String regex)', 'SELECTOR_TEXT_REGEX', 25],
|
30
|
-
26 => ['classNameMatches(String regex)', 'SELECTOR_CLASS_REGEX', 26],
|
31
|
-
27 => ['descriptionMatches(String regex)', 'SELECTOR_DESCRIPTION_REGEX', 27],
|
32
|
-
28 => ['packageNameMatches(String regex)', 'SELECTOR_PACKAGE_NAME_REGEX', 28],
|
33
|
-
29 => ['resourceId(String id)', 'SELECTOR_RESOURCE_ID', 29],
|
34
|
-
30 => ['checkable(boolean val)', 'SELECTOR_CHECKABLE', 30],
|
35
|
-
31 => ['resourceIdMatches(String regex)', 'SELECTOR_RESOURCE_ID_REGEX', 31],
|
36
|
-
# // start internal methods at 100
|
37
|
-
100 => ['getStringAttribute("name")', 'GET_NAME', 100]
|
38
|
-
}
|
39
|
-
|
40
|
-
# @private
|
41
|
-
def dynamic_code_to_string code, value=false
|
42
|
-
result = @@map[code].first
|
43
|
-
return result unless value
|
44
|
-
result.split('(').first + "( \"#{value}\" )"
|
45
|
-
end
|
46
|
-
end # class Driver
|
47
|
-
end # module Appium
|