appium_lib 12.1.3 → 12.2.1
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +80 -0
- data/CHANGELOG.md +20 -0
- data/appium_lib.gemspec +3 -3
- data/docs/android_docs.md +207 -207
- data/docs/ios_docs.md +245 -245
- data/lib/appium_lib/android/common/helper.rb +4 -4
- data/lib/appium_lib/android/espresso/element/button.rb +2 -2
- data/lib/appium_lib/driver.rb +9 -13
- data/lib/appium_lib/sauce_labs.rb +3 -3
- data/lib/appium_lib/version.rb +2 -2
- data/readme.md +0 -1
- data/release_notes.md +31 -0
- metadata +8 -14
|
@@ -233,12 +233,12 @@ module Appium
|
|
|
233
233
|
r_id = resource_id(value, " or @resource-id='#{value}'")
|
|
234
234
|
|
|
235
235
|
if class_name == '*'
|
|
236
|
-
return "//*[contains(translate(@text,'#{value.upcase}', '#{value}'), '#{value}')" \
|
|
237
|
-
"
|
|
236
|
+
return "//*[contains(translate(@text,'#{value.upcase}', '#{value}'), '#{value}') " \
|
|
237
|
+
"or contains(translate(@content-desc,'#{value.upcase}', '#{value}'), '#{value}')" + r_id + ']'
|
|
238
238
|
end
|
|
239
239
|
|
|
240
|
-
"//#{class_name}[contains(translate(@text,'#{value.upcase}', '#{value}'), '#{value}')" \
|
|
241
|
-
"
|
|
240
|
+
"//#{class_name}[contains(translate(@text,'#{value.upcase}', '#{value}'), '#{value}') " \
|
|
241
|
+
"or contains(translate(@content-desc,'#{value.upcase}', '#{value}'), '#{value}')" + r_id + ']'
|
|
242
242
|
end
|
|
243
243
|
|
|
244
244
|
# Returns a string that matches the first element that contains value
|
|
@@ -129,8 +129,8 @@ module Appium
|
|
|
129
129
|
|
|
130
130
|
def _button_contains_string_xpath(class_name, value)
|
|
131
131
|
r_id = resource_id(value, " or @resource-id='#{value}'")
|
|
132
|
-
"//#{class_name}[contains(translate(@text,'#{value.upcase}', '#{value}'), '#{value}')" \
|
|
133
|
-
"
|
|
132
|
+
"//#{class_name}[contains(translate(@text,'#{value.upcase}', '#{value}'), '#{value}') " \
|
|
133
|
+
"or contains(translate(@content-desc,'#{value.upcase}', '#{value}'), '#{value}')#{r_id}]"
|
|
134
134
|
end
|
|
135
135
|
end # module Element
|
|
136
136
|
end # module Espresso
|
data/lib/appium_lib/driver.rb
CHANGED
|
@@ -170,7 +170,7 @@ module Appium
|
|
|
170
170
|
@custom_url = @core.custom_url
|
|
171
171
|
@export_session = @core.export_session
|
|
172
172
|
@export_session_path = @core.export_session_path
|
|
173
|
-
@default_wait = @core.default_wait
|
|
173
|
+
@default_wait = @core.default_wait || 0
|
|
174
174
|
@appium_port = @core.port
|
|
175
175
|
@appium_wait_timeout = @core.wait_timeout
|
|
176
176
|
@appium_wait_interval = @core.wait_interval
|
|
@@ -221,12 +221,8 @@ module Appium
|
|
|
221
221
|
::Appium::Android::Bridge.for(self)
|
|
222
222
|
end
|
|
223
223
|
when :ios, :tvos
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
::Appium::Ios::Xcuitest::Bridge.for(self)
|
|
227
|
-
else # default and UIAutomation
|
|
228
|
-
::Appium::Ios::Bridge.for(self)
|
|
229
|
-
end
|
|
224
|
+
# default and XCUITest
|
|
225
|
+
::Appium::Ios::Xcuitest::Bridge.for(self)
|
|
230
226
|
when :mac
|
|
231
227
|
# no Mac specific extentions
|
|
232
228
|
Appium::Logger.debug('mac')
|
|
@@ -285,7 +281,7 @@ module Appium
|
|
|
285
281
|
custom_url: @core.custom_url,
|
|
286
282
|
export_session: @core.export_session,
|
|
287
283
|
export_session_path: @core.export_session_path,
|
|
288
|
-
default_wait: @
|
|
284
|
+
default_wait: @default_wait,
|
|
289
285
|
sauce_username: @sauce.username,
|
|
290
286
|
sauce_access_key: @sauce.access_key,
|
|
291
287
|
sauce_endpoint: @sauce.endpoint,
|
|
@@ -525,7 +521,7 @@ module Appium
|
|
|
525
521
|
# @return [Selenium::WebDriver] the new global driver
|
|
526
522
|
def start_driver(http_client_ops =
|
|
527
523
|
{ http_client: ::Appium::Http::Default.new, open_timeout: 999_999, read_timeout: 999_999 })
|
|
528
|
-
@core.
|
|
524
|
+
@core.driver&.quit
|
|
529
525
|
|
|
530
526
|
# If automationName is set only in server side, then the following automation_name should be nil before
|
|
531
527
|
# starting driver.
|
|
@@ -559,18 +555,18 @@ module Appium
|
|
|
559
555
|
@driver.manage.timeouts.implicit_wait = 0
|
|
560
556
|
end
|
|
561
557
|
|
|
562
|
-
# Set implicit wait. Default to @
|
|
558
|
+
# Set implicit wait. Default to @default_wait.
|
|
563
559
|
#
|
|
564
560
|
# @example
|
|
565
561
|
#
|
|
566
562
|
# set_wait 2
|
|
567
|
-
# set_wait # @
|
|
563
|
+
# set_wait # @default_wait
|
|
568
564
|
#
|
|
569
565
|
#
|
|
570
566
|
# @param timeout [Integer] the timeout in seconds
|
|
571
567
|
# @return [void]
|
|
572
568
|
def set_wait(timeout = nil)
|
|
573
|
-
timeout = @
|
|
569
|
+
timeout = @default_wait if timeout.nil?
|
|
574
570
|
@driver.manage.timeouts.implicit_wait = timeout
|
|
575
571
|
end
|
|
576
572
|
|
|
@@ -586,7 +582,7 @@ module Appium
|
|
|
586
582
|
# wait to after checking existence
|
|
587
583
|
# @yield The block to call
|
|
588
584
|
# @return [Boolean]
|
|
589
|
-
def exists(pre_check = 0, post_check = @
|
|
585
|
+
def exists(pre_check = 0, post_check = @default_wait)
|
|
590
586
|
# do not uset set_wait here.
|
|
591
587
|
# it will cause problems with other methods reading the default_wait of 0
|
|
592
588
|
# which then gets converted to a 1 second wait.
|
|
@@ -45,13 +45,13 @@ module Appium
|
|
|
45
45
|
# sauce_labs.endpoint #=> "ondemand.other-saucelabs.com:443/wd/hub"
|
|
46
46
|
#
|
|
47
47
|
def initialize(appium_lib_opts)
|
|
48
|
-
@username = appium_lib_opts.fetch :sauce_username, ENV
|
|
48
|
+
@username = appium_lib_opts.fetch :sauce_username, ENV.fetch('SAUCE_USERNAME', nil)
|
|
49
49
|
@username = nil if !@username || (@username.is_a?(String) && @username.empty?)
|
|
50
50
|
|
|
51
|
-
@access_key = appium_lib_opts.fetch :sauce_access_key, ENV
|
|
51
|
+
@access_key = appium_lib_opts.fetch :sauce_access_key, ENV.fetch('SAUCE_ACCESS_KEY', nil)
|
|
52
52
|
@access_key = nil if !@access_key || (@access_key.is_a?(String) && @access_key.empty?)
|
|
53
53
|
|
|
54
|
-
@endpoint = appium_lib_opts.fetch :sauce_endpoint, ENV
|
|
54
|
+
@endpoint = appium_lib_opts.fetch :sauce_endpoint, ENV.fetch('SAUCE_ENDPOINT', nil)
|
|
55
55
|
@endpoint = 'ondemand.saucelabs.com:443/wd/hub' if !@endpoint || (@endpoint.is_a?(String) && @endpoint.empty?)
|
|
56
56
|
end
|
|
57
57
|
|
data/lib/appium_lib/version.rb
CHANGED
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
module Appium
|
|
16
16
|
# Version and Date are defined on the 'Appium' module, not 'Appium::Common'
|
|
17
|
-
VERSION = '12.1
|
|
18
|
-
DATE = '
|
|
17
|
+
VERSION = '12.2.1' unless defined? ::Appium::VERSION
|
|
18
|
+
DATE = '2023-04-24' unless defined? ::Appium::DATE
|
|
19
19
|
end
|
data/readme.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# appium_lib
|
|
2
2
|
|
|
3
3
|
[](http://badge.fury.io/rb/appium_lib)
|
|
4
|
-
[](https://travis-ci.org/appium/ruby_lib/builds)
|
|
5
4
|
|
|
6
5
|
[](https://rubygems.org/gems/appium_lib)
|
|
7
6
|
|
data/release_notes.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
#### v12.2.1 2023-04-24
|
|
2
|
+
|
|
3
|
+
- [8e93297](https://github.com/appium/ruby_lib/commit/8e932971b216be735290757d1885498e8d57347f) Release 12.2.1
|
|
4
|
+
- [a47a7ad](https://github.com/appium/ruby_lib/commit/a47a7ad905ce36b94568cdf54b45eeeffd3eaad5) docs: remove travis badge
|
|
5
|
+
- [a93d286](https://github.com/appium/ruby_lib/commit/a93d286106d706ef5bb6d97680542b2f79483d4f) fix default_wait value (#983)
|
|
6
|
+
- [712ab14](https://github.com/appium/ruby_lib/commit/712ab14dd6d798962b228da831bebd20f2c73403) chore: Update rubocop requirement from = 1.49.0 to = 1.50.2 (#982)
|
|
7
|
+
- [363067e](https://github.com/appium/ruby_lib/commit/363067edd60ba9d557c37d4153398000f5447067) chore: Update rubocop requirement from = 1.48.1 to = 1.49.0 (#979)
|
|
8
|
+
- [779cbc0](https://github.com/appium/ruby_lib/commit/779cbc020f10fb405c3b02a96a1215864a571028) chore: Update rubocop requirement from = 1.47.0 to = 1.48.1 (#978)
|
|
9
|
+
- [225c510](https://github.com/appium/ruby_lib/commit/225c510042ccc1e32ed716b8fa4f6b617ebd409f) chore: Update rubocop requirement from = 1.46.0 to = 1.47.0 (#976)
|
|
10
|
+
- [9715260](https://github.com/appium/ruby_lib/commit/9715260e2d752b3967cbfb2f052c4693d883f634) chore: Update rubocop requirement from = 1.45.1 to = 1.46.0 (#975)
|
|
11
|
+
- [1fd3bf7](https://github.com/appium/ruby_lib/commit/1fd3bf7988d54e3cbf9be4cdd8a2ffef0ffffb6a) core#quit_driver is deprecated use core.driver.quit (#973)
|
|
12
|
+
- [3850ae2](https://github.com/appium/ruby_lib/commit/3850ae2b3fc2e09389ba04cbf741369aab37f7c1) chore: Update fakefs requirement from ~> 2.3.0 to ~> 2.4.0 (#972)
|
|
13
|
+
- [a4d1808](https://github.com/appium/ruby_lib/commit/a4d1808c381165559d8efd453337cfe2a0f5262d) chore: Update fakefs requirement from ~> 2.2.0 to ~> 2.3.0 (#971)
|
|
14
|
+
- [a913380](https://github.com/appium/ruby_lib/commit/a9133804acc497ac72a48644bba3b77afb7a71b7) chore: Update fakefs requirement from ~> 2.0.0 to ~> 2.2.0 (#970)
|
|
15
|
+
- [129bebb](https://github.com/appium/ruby_lib/commit/129bebb79c9eab5933bf10f76a56540a6995fffc) chore: Update rubocop requirement from = 1.44.1 to = 1.45.1 (#969)
|
|
16
|
+
- [1781671](https://github.com/appium/ruby_lib/commit/17816716ee3f7bdcae8eeb24a4dc279735929524) chore: Update rubocop requirement from = 1.44.0 to = 1.44.1 (#968)
|
|
17
|
+
- [852af7d](https://github.com/appium/ruby_lib/commit/852af7d2cbf08408f541bb7850a6bfef7b6270b6) chore: Update rubocop requirement from = 1.43.0 to = 1.44.0 (#967)
|
|
18
|
+
- [06a3194](https://github.com/appium/ruby_lib/commit/06a3194c3e57006f8ac957b3aca2eeb2bf640d9f) chore: Update rubocop requirement from = 1.42.0 to = 1.43.0 (#966)
|
|
19
|
+
- [a19f211](https://github.com/appium/ruby_lib/commit/a19f211a7ed0030de0b243db62c4be297cb584cb) chore: Update fakefs requirement from ~> 1.9.0 to ~> 2.0.0 (#965)
|
|
20
|
+
- [9ea6c91](https://github.com/appium/ruby_lib/commit/9ea6c9126a90a405beb4d1bd86eebc4652db5698) chore: Update rubocop requirement from = 1.41.1 to = 1.42.0 (#964)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
#### v12.2.0 2022-12-25
|
|
24
|
+
|
|
25
|
+
- [83c756d](https://github.com/appium/ruby_lib/commit/83c756d67c3f19deff6e9270856e0889f3de8b9b) Release 12.2.0
|
|
26
|
+
- [e963c02](https://github.com/appium/ruby_lib/commit/e963c025630cb8eaab6dcdf47b1a9b402db98541) chore: bump the ruby core ver (#963)
|
|
27
|
+
- [ce80e17](https://github.com/appium/ruby_lib/commit/ce80e17369268be2c8da2a7007a8f5173c144404) chore: remove non-xuitest stuff (#960)
|
|
28
|
+
- [7011c05](https://github.com/appium/ruby_lib/commit/7011c05ccd14bbdb92652be8ec811d5c04c9dcc7) chore: Update rubocop requirement from = 1.41.0 to = 1.41.1 (#962)
|
|
29
|
+
- [18dc444](https://github.com/appium/ruby_lib/commit/18dc44429aba30dc675e0be020699790aa0f41ec) chore: Update rubocop requirement from = 1.40.0 to = 1.41.0 (#961)
|
|
30
|
+
|
|
31
|
+
|
|
1
32
|
#### v12.1.3 2022-12-13
|
|
2
33
|
|
|
3
34
|
- [65f8b1c](https://github.com/appium/ruby_lib/commit/65f8b1c4406f358bf4a44ef0d4d7ae429ddc23c4) Release 12.1.3
|
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: 12.1
|
|
4
|
+
version: 12.2.1
|
|
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:
|
|
12
|
+
date: 2023-04-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: appium_lib_core
|
|
@@ -17,20 +17,14 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - "~>"
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: '
|
|
21
|
-
- - ">="
|
|
22
|
-
- !ruby/object:Gem::Version
|
|
23
|
-
version: 5.5.2
|
|
20
|
+
version: '6.0'
|
|
24
21
|
type: :runtime
|
|
25
22
|
prerelease: false
|
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
27
24
|
requirements:
|
|
28
25
|
- - "~>"
|
|
29
26
|
- !ruby/object:Gem::Version
|
|
30
|
-
version: '
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: 5.5.2
|
|
27
|
+
version: '6.0'
|
|
34
28
|
- !ruby/object:Gem::Dependency
|
|
35
29
|
name: nokogiri
|
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -97,14 +91,14 @@ dependencies:
|
|
|
97
91
|
requirements:
|
|
98
92
|
- - "~>"
|
|
99
93
|
- !ruby/object:Gem::Version
|
|
100
|
-
version:
|
|
94
|
+
version: 2.4.0
|
|
101
95
|
type: :development
|
|
102
96
|
prerelease: false
|
|
103
97
|
version_requirements: !ruby/object:Gem::Requirement
|
|
104
98
|
requirements:
|
|
105
99
|
- - "~>"
|
|
106
100
|
- !ruby/object:Gem::Version
|
|
107
|
-
version:
|
|
101
|
+
version: 2.4.0
|
|
108
102
|
- !ruby/object:Gem::Dependency
|
|
109
103
|
name: hashdiff
|
|
110
104
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -167,14 +161,14 @@ dependencies:
|
|
|
167
161
|
requirements:
|
|
168
162
|
- - '='
|
|
169
163
|
- !ruby/object:Gem::Version
|
|
170
|
-
version: 1.
|
|
164
|
+
version: 1.50.2
|
|
171
165
|
type: :development
|
|
172
166
|
prerelease: false
|
|
173
167
|
version_requirements: !ruby/object:Gem::Requirement
|
|
174
168
|
requirements:
|
|
175
169
|
- - '='
|
|
176
170
|
- !ruby/object:Gem::Version
|
|
177
|
-
version: 1.
|
|
171
|
+
version: 1.50.2
|
|
178
172
|
- !ruby/object:Gem::Dependency
|
|
179
173
|
name: spec
|
|
180
174
|
requirement: !ruby/object:Gem::Requirement
|