appium_lib 12.1.0 → 12.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/docs/android_docs.md +205 -205
- data/docs/ios_docs.md +243 -243
- data/lib/appium_lib/driver.rb +4 -3
- data/lib/appium_lib/version.rb +2 -2
- data/readme.md +31 -7
- data/release_notes.md +6 -1
- metadata +2 -3
- data/docs/migration.md +0 -175
data/lib/appium_lib/driver.rb
CHANGED
@@ -101,6 +101,7 @@ module Appium
|
|
101
101
|
# app: '/path/to/MyiOS.app'
|
102
102
|
# },
|
103
103
|
# appium_lib: {
|
104
|
+
# server_url: 'http://127.0.0.1:4723'
|
104
105
|
# wait_timeout: 30
|
105
106
|
# }
|
106
107
|
# }
|
@@ -392,9 +393,6 @@ module Appium
|
|
392
393
|
def self.absolute_app_path(opts)
|
393
394
|
raise 'opts must be a hash' unless opts.is_a? Hash
|
394
395
|
|
395
|
-
::Appium::Logger.warning('[Deprecation] Converting the path to absolute path will be removed. ' \
|
396
|
-
'Please specify the full path which can be accessible from the appium server')
|
397
|
-
|
398
396
|
# FIXME: 'caps' and 'app' will be correct
|
399
397
|
caps = opts[:caps] || opts['caps'] || {}
|
400
398
|
app_path = caps[:app] || caps['app']
|
@@ -403,6 +401,9 @@ module Appium
|
|
403
401
|
return app_path if app_path.start_with? 'sauce-storage:'
|
404
402
|
return app_path if app_path =~ URI::DEFAULT_PARSER.make_regexp # public URL for Sauce
|
405
403
|
|
404
|
+
::Appium::Logger.warn('[Deprecation] Converting the path to absolute path will be removed. ' \
|
405
|
+
'Please specify the full path which can be accessible from the appium server')
|
406
|
+
|
406
407
|
absolute_app_path = File.expand_path app_path
|
407
408
|
if File.exist? absolute_app_path
|
408
409
|
absolute_app_path
|
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 = '2022-10-
|
17
|
+
VERSION = '12.1.1' unless defined? ::Appium::VERSION
|
18
|
+
DATE = '2022-10-19' unless defined? ::Appium::DATE
|
19
19
|
end
|
data/readme.md
CHANGED
@@ -6,22 +6,20 @@
|
|
6
6
|
[![Downloads](https://img.shields.io/gem/dt/appium_lib.svg)](https://rubygems.org/gems/appium_lib)
|
7
7
|
|
8
8
|
- [appium_lib on RubyGems](https://rubygems.org/gems/appium_lib)
|
9
|
-
- [Documentation for appium_lib](https://
|
9
|
+
- [Documentation for appium_lib](https://www.rubydoc.info/github/appium/ruby_lib)
|
10
10
|
- [Documentation for core lib](http://www.rubydoc.info/github/appium/ruby_lib_core)
|
11
11
|
- Especially [driver method for Appium](http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device)
|
12
|
-
- [Getting Started](https://github.com/appium/appium/blob/master/docs/en/about-appium/getting-started.md)
|
13
|
-
- [code examples](https://github.com/appium/sample-code/tree/master/sample-code/examples/ruby)
|
14
12
|
|
15
13
|
Helper methods for writing cross platform (iOS, Android) tests in Ruby using Appium. Note that user waits should not exceed 120 seconds if they're going to run on Sauce Labs.
|
16
14
|
|
17
|
-
**Recommend** to use [ruby_lib_core](https://github.com/appium/ruby_lib_core), which
|
15
|
+
**Recommend** to use [ruby_lib_core](https://github.com/appium/ruby_lib_core), which works as a Ruby client for Appium. `ruby_lib` wraps the core library with some additional helpful methods, but some of wrapped methods may have unexpected complexity.
|
18
16
|
Ordinary, `ruby_lib` worked with class driver, `$driver`, mainly.
|
19
17
|
We can avoid the class driver with current `ruby_lib`, but if you'd like to implement your test cases based on instance driver, `@driver`, you can consider using `ruby_lib_core` first.
|
20
18
|
|
21
19
|
# Setup
|
22
20
|
## Requirement
|
23
21
|
- [Appium](https://github.com/appium/appium#requirements)
|
24
|
-
- Ruby: 2.
|
22
|
+
- Ruby: 2.7+
|
25
23
|
|
26
24
|
### Ruby Lib and Appium
|
27
25
|
|
@@ -32,6 +30,33 @@ We can avoid the class driver with current `ruby_lib`, but if you'd like to impl
|
|
32
30
|
|
33
31
|
## Start appium server
|
34
32
|
|
33
|
+
### Appium 2
|
34
|
+
|
35
|
+
```bash
|
36
|
+
$ npm install -g appium@next
|
37
|
+
$ appium driver install xcuitest # proper driver name to install
|
38
|
+
$ appium server
|
39
|
+
```
|
40
|
+
|
41
|
+
> **Note** Please set `server_url` properly like the below since the appium 2
|
42
|
+
> changed the default WebDriver URL to without `/wd/hub` to follow W3C.
|
43
|
+
> ```
|
44
|
+
> opts = {
|
45
|
+
> caps: {
|
46
|
+
> automationName: 'xcuitest'
|
47
|
+
> platformName: 'ios',
|
48
|
+
> app: '/path/to/MyiOS.app'
|
49
|
+
> },
|
50
|
+
> appium_lib: {
|
51
|
+
> server_url: 'http://127.0.0.1:4723'
|
52
|
+
> }
|
53
|
+
> }
|
54
|
+
> appium_driver = Appium::Driver.new(opts)
|
55
|
+
> appium_driver.start_driver
|
56
|
+
> ```
|
57
|
+
> Or please start the appium server with `appium server --base-path=/wd/hub`
|
58
|
+
|
59
|
+
### Appium 1
|
35
60
|
```bash
|
36
61
|
$ npm install -g appium
|
37
62
|
$ appium
|
@@ -53,12 +78,11 @@ gem install appium_lib
|
|
53
78
|
|
54
79
|
# Documentation
|
55
80
|
|
56
|
-
- [Getting started](https://github.com/appium/appium
|
81
|
+
- [Getting started](https://github.com/appium/appium)
|
57
82
|
- [Overview](https://github.com/appium/ruby_lib/blob/master/docs/docs.md)
|
58
83
|
- [Ruby Android methods](https://github.com/appium/ruby_lib/blob/master/docs/android_docs.md)
|
59
84
|
- [Ruby iOS methods](https://github.com/appium/ruby_lib/blob/master/docs/ios_docs.md)
|
60
85
|
- [Tips for XCUITest for iOS](https://github.com/appium/ruby_lib/blob/master/docs/ios_xcuitest.md)
|
61
|
-
- [Appium Server docs](https://github.com/appium/appium/tree/master/docs)
|
62
86
|
|
63
87
|
# Related libraries
|
64
88
|
- [ruby_lib_core](https://github.com/appium/ruby_lib_core): Bridged commands, WebDriver dependencies
|
data/release_notes.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
|
-
#### v12.1.
|
1
|
+
#### v12.1.1 2022-10-19
|
2
2
|
|
3
|
+
- [83c89c1](https://github.com/appium/ruby_lib/commit/83c89c107ea0e030b7eae2d8ab664c38766df6ed) Release 12.1.1
|
4
|
+
- [e40222d](https://github.com/appium/ruby_lib/commit/e40222d66f497fe295aea982ef0c042b901f6e3f) fix: use warn (#951)
|
5
|
+
- [a9b7558](https://github.com/appium/ruby_lib/commit/a9b75583e9923ade4f4fd16cb7fad03cc0f7c1be) docs: tweak
|
6
|
+
- [600f867](https://github.com/appium/ruby_lib/commit/600f8670f97d91babfd84e1c6c1ef34d2682b883) docs: updating (#950)
|
7
|
+
- [a81ea4b](https://github.com/appium/ruby_lib/commit/a81ea4b2a74ea71fa62c1756ffea2f85da57d49b) docd: udpate readme
|
3
8
|
- [8f20fe1](https://github.com/appium/ruby_lib/commit/8f20fe12b728195a8d2eb7d39004de4075caeff8) Release 12.1.0
|
4
9
|
- [b00662a](https://github.com/appium/ruby_lib/commit/b00662a3976aeadc8d5385fd00129fb9dafa967c) chore: specify latest core
|
5
10
|
- [98a3c6b](https://github.com/appium/ruby_lib/commit/98a3c6b9720eeff74f6eefda6e54196477854ed3) feat: update the minimal ruby lib core version (#946)
|
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.1.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: 2022-10-
|
12
|
+
date: 2022-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: appium_lib_core
|
@@ -236,7 +236,6 @@ files:
|
|
236
236
|
- docs/docs.md
|
237
237
|
- docs/ios_docs.md
|
238
238
|
- docs/ios_xcuitest.md
|
239
|
-
- docs/migration.md
|
240
239
|
- docs/parallel.md
|
241
240
|
- docs/w3c.md
|
242
241
|
- lib/appium_lib.rb
|
data/docs/migration.md
DELETED
@@ -1,175 +0,0 @@
|
|
1
|
-
### Breaking Changes in 9.13.0
|
2
|
-
Change the results of `app_state`
|
3
|
-
|
4
|
-
- After
|
5
|
-
```
|
6
|
-
driver.app_state('com.example.apple-samplecode.UICatalog') #=> :running_in_foreground
|
7
|
-
```
|
8
|
-
|
9
|
-
- Before
|
10
|
-
```
|
11
|
-
driver.app_state('com.example.apple-samplecode.UICatalog') #=> 1
|
12
|
-
```
|
13
|
-
|
14
|
-
### Breaking Changes in 9.9.0
|
15
|
-
Change `start_recording_screen` interface. Please read [documentation](https://github.com/appium/ruby_lib_core/blob/0ba7b1c726f02e11d6daa46481309b1e0e54b00e/lib/appium_lib_core/android/device.rb#L84) for more details.
|
16
|
-
|
17
|
-
- After
|
18
|
-
|
19
|
-
```ruby
|
20
|
-
start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil, video_size: nil, time_limit: '180', bit_rate: '4000000')
|
21
|
-
```
|
22
|
-
|
23
|
-
- Before
|
24
|
-
|
25
|
-
```ruby
|
26
|
-
start_recording_screen(file_path: 'file path in /sdcard/...', video_size: 'videosize', time_limit: '180', bit_rate: '4000000')
|
27
|
-
```
|
28
|
-
|
29
|
-
|
30
|
-
### Breaking Changes in 9.6.0
|
31
|
-
Raise warning if users call `Appium::Driver.new(opts)`.
|
32
|
-
|
33
|
-
- After
|
34
|
-
|
35
|
-
```ruby
|
36
|
-
Appium::Driver.new(opts).start_driver # Raise warning.
|
37
|
-
Appium::Driver.new(opts, true).start_driver # $driver is defined.
|
38
|
-
Appium::Driver.new(opts, false).start_driver # $driver isn't defined.
|
39
|
-
```
|
40
|
-
|
41
|
-
- Before
|
42
|
-
|
43
|
-
```ruby
|
44
|
-
Appium::Driver.new(opts).start_driver # $driver is defined.
|
45
|
-
```
|
46
|
-
|
47
|
-
### Breaking Changes in 9.3.7
|
48
|
-
change `@selenium_driver.find_element/s_with_appium` to `@selenium_driver.find_element/s`.
|
49
|
-
ref: https://github.com/appium/ruby_lib/pull/532
|
50
|
-
|
51
|
-
A breaking change in v9.1.0 is reverted in this version.
|
52
|
-
|
53
|
-
Old | New
|
54
|
-
:--|:--
|
55
|
-
`@selenium_driver.find_element/s_with_appium` | `@selenium_driver.find_element/s`
|
56
|
-
|
57
|
-
- after
|
58
|
-
|
59
|
-
```
|
60
|
-
@selenium_driver.find_element :accessibility_id, "some ids"
|
61
|
-
@selenium_driver.find_elements :accessibility_id, "some ids"
|
62
|
-
```
|
63
|
-
|
64
|
-
- before
|
65
|
-
|
66
|
-
```
|
67
|
-
@selenium_driver.find_element_with_appium :accessibility_id, "some ids"
|
68
|
-
@selenium_driver.find_elements_with_appium :accessibility_id, "some ids"
|
69
|
-
```
|
70
|
-
|
71
|
-
|
72
|
-
### Breaking Changes in 9.1.0
|
73
|
-
change `@selenium_driver.find_element/s` to `@selenium_driver.find_element/s_with_appium`.
|
74
|
-
ref: https://github.com/appium/ruby_lib/pull/383
|
75
|
-
|
76
|
-
Old | New
|
77
|
-
:--|:--
|
78
|
-
`@selenium_driver.find_element/s` | `@selenium_driver.find_element/s_with_appium`
|
79
|
-
|
80
|
-
- after
|
81
|
-
|
82
|
-
```
|
83
|
-
@selenium_driver.find_element_with_appium :accessibility_id, "some ids"
|
84
|
-
@selenium_driver.find_elements_with_appium :accessibility_id, "some ids"
|
85
|
-
```
|
86
|
-
|
87
|
-
- before
|
88
|
-
|
89
|
-
```
|
90
|
-
@selenium_driver.find_element :accessibility_id, "some ids"
|
91
|
-
@selenium_driver.find_elements :accessibility_id, "some ids"
|
92
|
-
```
|
93
|
-
|
94
|
-
### Breaking Changes in 8.2.0
|
95
|
-
change `Appium.load_appium_txt` to `Appium.load_settings`.
|
96
|
-
|
97
|
-
Old | New
|
98
|
-
:--|:--
|
99
|
-
`Appium.load_appium_txt` | `Appium.load_settings`
|
100
|
-
|
101
|
-
- after
|
102
|
-
|
103
|
-
```
|
104
|
-
dir = File.expand_path(File.join(Dir.pwd, 'lib'))
|
105
|
-
appium_txt = File.join(Dir.pwd, 'appium.txt')
|
106
|
-
caps = Appium.load_settings file: appium_txt, verbose: true
|
107
|
-
```
|
108
|
-
|
109
|
-
- before
|
110
|
-
|
111
|
-
```
|
112
|
-
appium_txt = File.expand_path(File.join(Dir.pwd, 'lib'))
|
113
|
-
dir = appium_txt
|
114
|
-
caps = Appium.load_appium_txt file: appium_txt, verbose: true
|
115
|
-
```
|
116
|
-
|
117
|
-
### Breaking Changes in 7.0
|
118
|
-
|
119
|
-
Requires appium 1.4.0-beta or newer for iOS helper methods. appium_lib no longer automatically promotes methods on minispec. To restore the old behavior use: `Appium.promote_appium_methods ::Minitest::Spec`
|
120
|
-
|
121
|
-
The implicit wait now defaults to zero. To restore the old behavior, use `set_wait 30`.
|
122
|
-
|
123
|
-
Old | New
|
124
|
-
:--|:--
|
125
|
-
`installed?` | `app_installed?`
|
126
|
-
|
127
|
-
### Breaking Changes in 5.0
|
128
|
-
|
129
|
-
Old | New
|
130
|
-
:--|:--
|
131
|
-
`launch` | `launch_app`
|
132
|
-
`install` | `install_app`
|
133
|
-
`remove` | `remove_app`
|
134
|
-
|
135
|
-
method_missing has been removed from the Ruby bindings. If you want to invoke methods on the top level object,
|
136
|
-
you can use the following:
|
137
|
-
|
138
|
-
`Appium.promote_appium_methods Object`
|
139
|
-
|
140
|
-
Also make sure to update to Appium Ruby Console v1.0.3 or better. Old consoles will not work with the 5.0 release due to the removal of method_missing.
|
141
|
-
|
142
|
-
### Breaking Changes in 4.0
|
143
|
-
|
144
|
-
Old | New
|
145
|
-
:--|:--
|
146
|
-
`key_event` | `press_keycode`
|
147
|
-
|
148
|
-
### Breaking Changes in 2.0
|
149
|
-
|
150
|
-
In 2.0, the e_* methods have been renamed.
|
151
|
-
|
152
|
-
Old | New
|
153
|
-
:--|:--
|
154
|
-
`e_buttons` | `buttons`
|
155
|
-
`e_s_texts` | `texts`
|
156
|
-
`e_textfields` | `textfields`
|
157
|
-
|
158
|
-
All s_texts methods have been renamed.
|
159
|
-
|
160
|
-
Old | New
|
161
|
-
:--|:--
|
162
|
-
`s_text` | `text`
|
163
|
-
`s_texts` | `texts`
|
164
|
-
`first_s_text` | `first_text`
|
165
|
-
`last_s_text` | `last_text`
|
166
|
-
`s_text_exact` | `text_exact`
|
167
|
-
`s_texts_exact` | `texts_exact`
|
168
|
-
|
169
|
-
Other changes:
|
170
|
-
|
171
|
-
Old | New
|
172
|
-
:--|:--
|
173
|
-
`press_for_duration` | `long_press`
|
174
|
-
`current_context=` | `set_context`
|
175
|
-
`name` | `find`
|