appium_lib 10.2.0 → 10.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -14
  3. data/.travis.yml +0 -2
  4. data/CHANGELOG.md +9 -0
  5. data/Gemfile +14 -0
  6. data/Rakefile +14 -0
  7. data/appium_lib.gemspec +2 -2
  8. data/docs/android_docs.md +261 -229
  9. data/docs/ios_docs.md +346 -282
  10. data/lib/appium_lib.rb +14 -0
  11. data/lib/appium_lib/android/android.rb +14 -0
  12. data/lib/appium_lib/android/common/command/command.rb +14 -0
  13. data/lib/appium_lib/android/common/helper.rb +14 -0
  14. data/lib/appium_lib/android/element/alert.rb +14 -0
  15. data/lib/appium_lib/android/element/button.rb +35 -18
  16. data/lib/appium_lib/android/element/generic.rb +14 -0
  17. data/lib/appium_lib/android/element/text.rb +29 -14
  18. data/lib/appium_lib/android/element/textfield.rb +30 -15
  19. data/lib/appium_lib/android/espresso.rb +14 -0
  20. data/lib/appium_lib/android/espresso/bridge.rb +14 -0
  21. data/lib/appium_lib/android/espresso/element.rb +14 -0
  22. data/lib/appium_lib/android/espresso/element/button.rb +26 -12
  23. data/lib/appium_lib/android/espresso/element/generic.rb +14 -0
  24. data/lib/appium_lib/android/espresso/helper.rb +14 -0
  25. data/lib/appium_lib/android/uiautomator2.rb +14 -0
  26. data/lib/appium_lib/android/uiautomator2/bridge.rb +14 -0
  27. data/lib/appium_lib/android/uiautomator2/element.rb +14 -0
  28. data/lib/appium_lib/android/uiautomator2/element/button.rb +14 -0
  29. data/lib/appium_lib/android/uiautomator2/helper.rb +14 -0
  30. data/lib/appium_lib/appium.rb +14 -0
  31. data/lib/appium_lib/common/command.rb +14 -0
  32. data/lib/appium_lib/common/command/ws_logcat.rb +14 -0
  33. data/lib/appium_lib/common/device.rb +14 -0
  34. data/lib/appium_lib/common/helper.rb +19 -5
  35. data/lib/appium_lib/common/http_client.rb +14 -0
  36. data/lib/appium_lib/common/log.rb +14 -0
  37. data/lib/appium_lib/common/multi_touch.rb +14 -0
  38. data/lib/appium_lib/common/touch_actions.rb +14 -0
  39. data/lib/appium_lib/common/wait.rb +14 -0
  40. data/lib/appium_lib/driver.rb +16 -2
  41. data/lib/appium_lib/ios/common/errors.rb +14 -0
  42. data/lib/appium_lib/ios/common/helper.rb +15 -1
  43. data/lib/appium_lib/ios/element/alert.rb +14 -0
  44. data/lib/appium_lib/ios/element/button.rb +26 -9
  45. data/lib/appium_lib/ios/element/generic.rb +14 -0
  46. data/lib/appium_lib/ios/element/text.rb +26 -9
  47. data/lib/appium_lib/ios/element/textfield.rb +25 -7
  48. data/lib/appium_lib/ios/ios.rb +14 -0
  49. data/lib/appium_lib/ios/xcuitest.rb +14 -0
  50. data/lib/appium_lib/ios/xcuitest/bridge.rb +14 -0
  51. data/lib/appium_lib/ios/xcuitest/command.rb +14 -0
  52. data/lib/appium_lib/ios/xcuitest/command/certificate.rb +14 -0
  53. data/lib/appium_lib/ios/xcuitest/command/gestures.rb +14 -0
  54. data/lib/appium_lib/ios/xcuitest/command/get_context.rb +14 -0
  55. data/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb +14 -0
  56. data/lib/appium_lib/ios/xcuitest/command/pasteboard.rb +14 -0
  57. data/lib/appium_lib/ios/xcuitest/command/source.rb +14 -0
  58. data/lib/appium_lib/ios/xcuitest/element.rb +14 -0
  59. data/lib/appium_lib/ios/xcuitest/element/button.rb +22 -8
  60. data/lib/appium_lib/ios/xcuitest/element/generic.rb +14 -0
  61. data/lib/appium_lib/ios/xcuitest/element/text.rb +22 -8
  62. data/lib/appium_lib/ios/xcuitest/element/textfield.rb +18 -4
  63. data/lib/appium_lib/ios/xcuitest/helper.rb +14 -0
  64. data/lib/appium_lib/sauce_labs.rb +14 -0
  65. data/lib/appium_lib/version.rb +16 -2
  66. data/release_notes.md +7 -0
  67. metadata +4 -4
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Ios
3
17
  module Xcuitest
@@ -1,19 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  # UIAStaticText|XCUIElementTypeStaticText methods
2
16
  module Appium
3
17
  module Ios
4
18
  module Xcuitest
5
19
  module Element
6
- # XCUIElementTypeStaticText = 'XCUIElementTypeStaticText'.freeze
20
+ # XCUIELEMENT_TYPE_STATIC_TEXT = 'XCUIElementTypeStaticText'
7
21
 
8
22
  # @return [String] Class name for text
9
23
  def static_text_class
10
- ::Appium::Ios::XCUIElementTypeStaticText
24
+ ::Appium::Ios::XCUIELEMENT_TYPE_STATIC_TEXT
11
25
  end
12
26
 
13
27
  # Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index.
14
28
  # @param value [String, Integer] the value to find.
15
29
  # If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned.
16
- # @return [UIAStaticText|XCUIElementTypeStaticText]
30
+ # @return [UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
17
31
  def text(value)
18
32
  return ele_index static_text_class, value if value.is_a? Numeric
19
33
 
@@ -23,7 +37,7 @@ module Appium
23
37
  # Find all UIAStaticTexts|XCUIElementTypeStaticTexts containing value.
24
38
  # If value is omitted, all UIAStaticTexts|XCUIElementTypeStaticTexts are returned
25
39
  # @param value [String] the value to search for
26
- # @return [Array<UIAStaticText|XCUIElementTypeStaticText>]
40
+ # @return [Array<UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT>]
27
41
  def texts(value = false)
28
42
  return tags static_text_class unless value
29
43
 
@@ -32,27 +46,27 @@ module Appium
32
46
  end
33
47
 
34
48
  # Find the first UIAStaticText|XCUIElementTypeStaticText.
35
- # @return [UIAStaticText|XCUIElementTypeStaticText]
49
+ # @return [UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
36
50
  def first_text
37
51
  first_ele static_text_class
38
52
  end
39
53
 
40
54
  # Find the last UIAStaticText|XCUIElementTypeStaticText.
41
- # @return [UIAStaticText|XCUIElementTypeStaticText]
55
+ # @return [UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
42
56
  def last_text
43
57
  last_ele static_text_class
44
58
  end
45
59
 
46
60
  # Find the first UIAStaticText|XCUIElementTypeStaticText that exactly matches value.
47
61
  # @param value [String] the value to match exactly
48
- # @return [UIAStaticText|XCUIElementTypeStaticText]
62
+ # @return [UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
49
63
  def text_exact(value)
50
64
  raise_error_if_no_element texts_exact(value).first
51
65
  end
52
66
 
53
67
  # Find all UIAStaticTexts|XCUIElementTypeStaticTexts that exactly match value.
54
68
  # @param value [String] the value to match exactly
55
- # @return [Array<UIAStaticText|XCUIElementTypeStaticText>]
69
+ # @return [Array<UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT>]
56
70
  def texts_exact(value)
57
71
  elements = find_eles_by_predicate(class_name: static_text_class, value: value)
58
72
  select_visible_elements elements
@@ -1,18 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Ios
3
17
  module Xcuitest
4
18
  module Element
5
- # XCUIElementTypeTextField = 'XCUIElementTypeTextField'.freeze
6
- # XCUIElementTypeSecureTextField = 'XCUIElementTypeSecureTextField'.freeze
19
+ # XCUIElementTypeTextField = 'XCUIElementTypeTextField'
20
+ # XCUIElementTypeSecureTextField = 'XCUIElementTypeSecureTextField'
7
21
 
8
22
  # @return [String] Class name for text field
9
23
  def text_field_class
10
- ::Appium::Ios::XCUIElementTypeTextField
24
+ ::Appium::Ios::XCUIELEMENT_TYPE_TEXT_FIELD
11
25
  end
12
26
 
13
27
  # @return [String] Class name for secure text field
14
28
  def secure_text_field_class
15
- ::Appium::Ios::XCUIElementTypeSecureTextField
29
+ ::Appium::Ios::XCUIELEMENT_TYPE_SECURE_TEXT_FIELD
16
30
  end
17
31
 
18
32
  # Find the first TextField that contains value or by index.
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Ios
3
17
  module Xcuitest
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  class SauceLabs
3
17
  # Username for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_USERNAME is in ENV.
@@ -1,5 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  # Version and Date are defined on the 'Appium' module, not 'Appium::Common'
3
- VERSION = '10.2.0'.freeze unless defined? ::Appium::VERSION
4
- DATE = '2019-03-01'.freeze unless defined? ::Appium::DATE
17
+ VERSION = '10.3.0' unless defined? ::Appium::VERSION
18
+ DATE = '2019-03-31' unless defined? ::Appium::DATE
5
19
  end
@@ -1,3 +1,10 @@
1
+ #### v10.3.0 2019-03-31
2
+
3
+ - [499e824](https://github.com/appium/ruby_lib/commit/499e824668f63958c2fe047b76841612f74d2c1c) Release 10.3.0
4
+ - [fa90527](https://github.com/appium/ruby_lib/commit/fa90527b709cbb2e9ea1e86276a2a884d2a9d4c3) bump core to 3.1.x (#857)
5
+ - [8e7abee](https://github.com/appium/ruby_lib/commit/8e7abeee3b0bc46b8d28b4352bed39819d68cbaf) Bump rubocop 23 (#855)
6
+
7
+
1
8
  #### v10.2.0 2019-03-01
2
9
 
3
10
  - [f1b8a2e](https://github.com/appium/ruby_lib/commit/f1b8a2e32fc935508e13431570fd7de4a90b6bd7) Release 10.2.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.2.0
4
+ version: 10.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-03-01 00:00:00.000000000 Z
12
+ date: 2019-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appium_lib_core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '3.0'
20
+ version: '3.1'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '3.0'
27
+ version: '3.1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: nokogiri
30
30
  requirement: !ruby/object:Gem::Requirement