appium_lib 12.2.0 → 12.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +80 -0
- data/CHANGELOG.md +11 -0
- data/appium_lib.gemspec +2 -2
- 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 +7 -7
- 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 +22 -0
- metadata +6 -6
@@ -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
|
@@ -281,7 +281,7 @@ module Appium
|
|
281
281
|
custom_url: @core.custom_url,
|
282
282
|
export_session: @core.export_session,
|
283
283
|
export_session_path: @core.export_session_path,
|
284
|
-
default_wait: @
|
284
|
+
default_wait: @default_wait,
|
285
285
|
sauce_username: @sauce.username,
|
286
286
|
sauce_access_key: @sauce.access_key,
|
287
287
|
sauce_endpoint: @sauce.endpoint,
|
@@ -521,7 +521,7 @@ module Appium
|
|
521
521
|
# @return [Selenium::WebDriver] the new global driver
|
522
522
|
def start_driver(http_client_ops =
|
523
523
|
{ http_client: ::Appium::Http::Default.new, open_timeout: 999_999, read_timeout: 999_999 })
|
524
|
-
@core.
|
524
|
+
@core.driver&.quit
|
525
525
|
|
526
526
|
# If automationName is set only in server side, then the following automation_name should be nil before
|
527
527
|
# starting driver.
|
@@ -555,18 +555,18 @@ module Appium
|
|
555
555
|
@driver.manage.timeouts.implicit_wait = 0
|
556
556
|
end
|
557
557
|
|
558
|
-
# Set implicit wait. Default to @
|
558
|
+
# Set implicit wait. Default to @default_wait.
|
559
559
|
#
|
560
560
|
# @example
|
561
561
|
#
|
562
562
|
# set_wait 2
|
563
|
-
# set_wait # @
|
563
|
+
# set_wait # @default_wait
|
564
564
|
#
|
565
565
|
#
|
566
566
|
# @param timeout [Integer] the timeout in seconds
|
567
567
|
# @return [void]
|
568
568
|
def set_wait(timeout = nil)
|
569
|
-
timeout = @
|
569
|
+
timeout = @default_wait if timeout.nil?
|
570
570
|
@driver.manage.timeouts.implicit_wait = timeout
|
571
571
|
end
|
572
572
|
|
@@ -582,7 +582,7 @@ module Appium
|
|
582
582
|
# wait to after checking existence
|
583
583
|
# @yield The block to call
|
584
584
|
# @return [Boolean]
|
585
|
-
def exists(pre_check = 0, post_check = @
|
585
|
+
def exists(pre_check = 0, post_check = @default_wait)
|
586
586
|
# do not uset set_wait here.
|
587
587
|
# it will cause problems with other methods reading the default_wait of 0
|
588
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.2.
|
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
|
[![Gem Version](https://badge.fury.io/rb/appium_lib.svg)](http://badge.fury.io/rb/appium_lib)
|
4
|
-
[![Travis Master](https://travis-ci.org/appium/ruby_lib.svg?branch=master)](https://travis-ci.org/appium/ruby_lib/builds)
|
5
4
|
|
6
5
|
[![Downloads](https://img.shields.io/gem/dt/appium_lib.svg)](https://rubygems.org/gems/appium_lib)
|
7
6
|
|
data/release_notes.md
CHANGED
@@ -1,3 +1,25 @@
|
|
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
|
+
|
1
23
|
#### v12.2.0 2022-12-25
|
2
24
|
|
3
25
|
- [83c756d](https://github.com/appium/ruby_lib/commit/83c756d67c3f19deff6e9270856e0889f3de8b9b) Release 12.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: 12.2.
|
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
|
@@ -91,14 +91,14 @@ dependencies:
|
|
91
91
|
requirements:
|
92
92
|
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
94
|
+
version: 2.4.0
|
95
95
|
type: :development
|
96
96
|
prerelease: false
|
97
97
|
version_requirements: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
99
|
- - "~>"
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
101
|
+
version: 2.4.0
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: hashdiff
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,14 +161,14 @@ dependencies:
|
|
161
161
|
requirements:
|
162
162
|
- - '='
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version: 1.
|
164
|
+
version: 1.50.2
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
169
|
- - '='
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version: 1.
|
171
|
+
version: 1.50.2
|
172
172
|
- !ruby/object:Gem::Dependency
|
173
173
|
name: spec
|
174
174
|
requirement: !ruby/object:Gem::Requirement
|