appium_lib_core 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +10 -0
- data/README.md +9 -0
- data/appium_lib_core.gemspec +1 -0
- data/lib/appium_lib_core/common/base/bridge/mjsonwp.rb +4 -0
- data/lib/appium_lib_core/common/base/driver.rb +7 -7
- data/lib/appium_lib_core/common/base/search_context.rb +12 -8
- data/lib/appium_lib_core/driver.rb +1 -10
- data/lib/appium_lib_core/version.rb +2 -2
- data/release_notes.md +13 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 007e3cc0b05fdd58ad6ccfd0456c468a45dc5a7d
|
4
|
+
data.tar.gz: 7c5fea474ec27a085859e1626ada18bf74eb6ed5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f606fa17c09df894c966fffbf628beea30d9811302a9e8141fcd83d3d45c03a3a7ce2c2698814833577a93032d293c0645e5e6dd8024b1d8b31e22019ae0e18d
|
7
|
+
data.tar.gz: 2a5c6755588badbb4c47d61a67ba9492260c04290fa98fcae953e0df26c88a808001d5f1378d0c50d6aea04486a618ec2adf06170063281d9487f8699a1d4c21
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,16 @@ All notable changes to this project will be documented in this file.
|
|
8
8
|
|
9
9
|
### Deprecations
|
10
10
|
|
11
|
+
## [1.9.1] - 2018-08-20
|
12
|
+
### Enhancements
|
13
|
+
- Add `:viewtag` for Espresso driver [appium-espresso-driver#189](https://github.com/appium/appium-espresso-driver/pull/189)
|
14
|
+
- Add missing `take_viewport_screenshot` for mjsonwp [#127](https://github.com/appium/ruby_lib_core/pull/127)
|
15
|
+
|
16
|
+
### Bug fixes
|
17
|
+
- [internal] Fix raising error in `set_implicit_wait_by_default` [#130](https://github.com/appium/ruby_lib_core/issues/130)
|
18
|
+
|
19
|
+
### Deprecations
|
20
|
+
|
11
21
|
## [1.9.0] - 2018-08-05
|
12
22
|
### Enhancements
|
13
23
|
- Update documentation about `start_recording_screen`
|
data/README.md
CHANGED
@@ -38,6 +38,15 @@ $ rake test:func:android # Andorid
|
|
38
38
|
$ rake test:func:ios # iOS
|
39
39
|
```
|
40
40
|
|
41
|
+
#### Run parallel tests with parallel_tests gem
|
42
|
+
|
43
|
+
- Create iPhone simulators named `iPhone 6 - 8100` and `iPhone 6 - 8101`
|
44
|
+
- Run iOS functional tests with below command
|
45
|
+
|
46
|
+
```
|
47
|
+
PARALLEL=1 bundle exec parallel_test test/functional/ios -n 2
|
48
|
+
```
|
49
|
+
|
41
50
|
## Run a test case
|
42
51
|
1. Launch the Appium server locally.
|
43
52
|
2. Run the following script.
|
data/appium_lib_core.gemspec
CHANGED
@@ -25,6 +25,10 @@ module Appium
|
|
25
25
|
def take_element_screenshot(element)
|
26
26
|
execute :take_element_screenshot, id: element.ref
|
27
27
|
end
|
28
|
+
|
29
|
+
def take_viewport_screenshot
|
30
|
+
execute_script('mobile: viewportScreenshot')
|
31
|
+
end
|
28
32
|
end # class MJSONWP
|
29
33
|
end # class Bridge
|
30
34
|
end # class Base
|
@@ -115,7 +115,7 @@ module Appium
|
|
115
115
|
#
|
116
116
|
# @example
|
117
117
|
#
|
118
|
-
# @driver.
|
118
|
+
# @driver.get_settings
|
119
119
|
#
|
120
120
|
def get_settings
|
121
121
|
@bridge.get_settings
|
@@ -804,7 +804,7 @@ module Appium
|
|
804
804
|
# You can handle settings for the comparision following below.
|
805
805
|
# @see https://github.com/appium/appium-base-driver/blob/master/lib/basedriver/device-settings.js#L6
|
806
806
|
#
|
807
|
-
# @param [String]
|
807
|
+
# @param [String] img_path A path to a partial image you'd like to find
|
808
808
|
#
|
809
809
|
# @return [::Selenium::WebDriver::Element]
|
810
810
|
#
|
@@ -814,8 +814,8 @@ module Appium
|
|
814
814
|
# autoUpdateImageElementPosition: true })
|
815
815
|
# e = @@driver.find_element_by_image './test/functional/data/test_element_image.png'
|
816
816
|
#
|
817
|
-
def find_element_by_image(
|
818
|
-
template = Base64.encode64 File.read
|
817
|
+
def find_element_by_image(img_path)
|
818
|
+
template = Base64.encode64 File.read img_path
|
819
819
|
find_element :image, template
|
820
820
|
end
|
821
821
|
|
@@ -825,7 +825,7 @@ module Appium
|
|
825
825
|
# You can handle settings for the comparision following below.
|
826
826
|
# @see https://github.com/appium/appium-base-driver/blob/master/lib/basedriver/device-settings.js#L6
|
827
827
|
#
|
828
|
-
# @param [String]
|
828
|
+
# @param [String] img_path A path to a partial image you'd like to find
|
829
829
|
#
|
830
830
|
# @return [::Selenium::WebDriver::Element]
|
831
831
|
#
|
@@ -836,8 +836,8 @@ module Appium
|
|
836
836
|
# e = @@driver.find_elements_by_image ['./test/functional/data/test_element_image.png']
|
837
837
|
# e == [] # if the `e` is empty
|
838
838
|
#
|
839
|
-
def find_elements_by_image(
|
840
|
-
template = Base64.encode64 File.read
|
839
|
+
def find_elements_by_image(img_path)
|
840
|
+
template = Base64.encode64 File.read img_path
|
841
841
|
find_elements :image, template
|
842
842
|
end
|
843
843
|
end # class Driver
|
@@ -5,18 +5,19 @@ module Appium
|
|
5
5
|
# referenced: ::Selenium::WebDriver::SearchContext
|
6
6
|
|
7
7
|
FINDERS = ::Selenium::WebDriver::SearchContext::FINDERS.merge(
|
8
|
-
accessibility_id:
|
9
|
-
image:
|
8
|
+
accessibility_id: 'accessibility id',
|
9
|
+
image: '-image',
|
10
10
|
# Android
|
11
|
-
uiautomator:
|
11
|
+
uiautomator: '-android uiautomator', # Unavailable in Espresso
|
12
|
+
viewtag: '-android viewtag', # Available in Espresso
|
12
13
|
# iOS
|
13
|
-
uiautomation:
|
14
|
-
predicate:
|
15
|
-
class_chain:
|
14
|
+
uiautomation: '-ios uiautomation',
|
15
|
+
predicate: '-ios predicate string',
|
16
|
+
class_chain: '-ios class chain',
|
16
17
|
# Windows
|
17
18
|
windows_uiautomation: '-windows uiautomation',
|
18
19
|
# Tizen
|
19
|
-
tizen_uiautomation:
|
20
|
+
tizen_uiautomation: '-tizen uiautomation'
|
20
21
|
)
|
21
22
|
|
22
23
|
#
|
@@ -54,6 +55,9 @@ module Appium
|
|
54
55
|
# # For Android
|
55
56
|
# ## With uiautomator
|
56
57
|
# find_elements :uiautomator, 'new UiSelector().clickable(true)'
|
58
|
+
# ## With viewtag, but only for Espresso
|
59
|
+
# ## `setTag`/`getTag` in https://developer.android.com/reference/android/view/View
|
60
|
+
# find_elements :viewtag, 'new UiSelector().clickable(true)'
|
57
61
|
#
|
58
62
|
# # For iOS
|
59
63
|
# ## With :predicate
|
@@ -113,7 +117,7 @@ module Appium
|
|
113
117
|
|
114
118
|
def _set_by_from_finders(how)
|
115
119
|
by = FINDERS[how.to_sym]
|
116
|
-
raise ArgumentError, "cannot find element by #{how.inspect}" unless by
|
120
|
+
raise ArgumentError, "cannot find element by #{how.inspect}. Available finders are #{FINDERS.keys}." unless by
|
117
121
|
by
|
118
122
|
end
|
119
123
|
|
@@ -228,16 +228,7 @@ module Appium
|
|
228
228
|
@driver.manage.timeouts.implicit_wait = wait
|
229
229
|
rescue ::Selenium::WebDriver::Error::UnknownError => e
|
230
230
|
unless e.message.include?('The operation requested is not yet implemented')
|
231
|
-
raise
|
232
|
-
end
|
233
|
-
|
234
|
-
Appium::Logger.debug(e.message)
|
235
|
-
{}
|
236
|
-
rescue ::Selenium::WebDriver::Error::WebDriverError => e
|
237
|
-
# FIXME: Temporary rescue until Appium support W3C's implicit wait
|
238
|
-
# https://github.com/jlipps/simple-wd-spec#set-timeouts
|
239
|
-
unless e.message.include?('Parameters were incorrect. We wanted {"required":["type","ms"]} and you sent ["implicit"]')
|
240
|
-
raise e.message, ::Appium::Core::Error::ServerError
|
231
|
+
raise ::Appium::Core::Error::ServerError, e.message
|
241
232
|
end
|
242
233
|
|
243
234
|
Appium::Logger.debug(e.message)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Appium
|
2
2
|
module Core
|
3
|
-
VERSION = '1.9.
|
4
|
-
DATE = '2018-08-
|
3
|
+
VERSION = '1.9.1'.freeze unless defined? ::Appium::Core::VERSION
|
4
|
+
DATE = '2018-08-20'.freeze unless defined? ::Appium::Core::DATE
|
5
5
|
end
|
6
6
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
#### v1.9.1 2018-08-20
|
2
|
+
|
3
|
+
- [7bcc947](https://github.com/appium/ruby_lib_core/commit/7bcc947d93c0617e45e89e94e901bedcbbf21d80) Release 1.9.1
|
4
|
+
- [221e837](https://github.com/appium/ruby_lib_core/commit/221e8370b1a55b6c15ceb870df5c789175ab4d12) Fix raising error format and remove unnecessary fixme (#131)
|
5
|
+
- [48d3a59](https://github.com/appium/ruby_lib_core/commit/48d3a59b2c35c1c9fd919ed5332b2a1a1ca452cf) add file management tests (#129)
|
6
|
+
- [0aa625f](https://github.com/appium/ruby_lib_core/commit/0aa625fad89ffa1d22f87494bf4282082c555a40) fix wrong example
|
7
|
+
- [f761985](https://github.com/appium/ruby_lib_core/commit/f76198545c020a0b95ad4faf097df1380c96df9a) tweak screenshot tests (#127)
|
8
|
+
- [6abc03b](https://github.com/appium/ruby_lib_core/commit/6abc03b58ec5b6d5d19228aaeab0bc8d9a85dae1) add simplecov (#126)
|
9
|
+
- [16681d2](https://github.com/appium/ruby_lib_core/commit/16681d2f82cde25c8491695f710ec28a5d10329f) change to instance style (#125)
|
10
|
+
- [29abb31](https://github.com/appium/ruby_lib_core/commit/29abb31225b984ed36f1fedf34b694c970d581ce) remove png prefix
|
11
|
+
- [987526d](https://github.com/appium/ruby_lib_core/commit/987526dfece92317e9aa7a5c26cea2f69bfe0bf0) Add view tag (#124)
|
12
|
+
|
13
|
+
|
1
14
|
#### v1.9.0 2018-08-05
|
2
15
|
|
3
16
|
- [cc9e378](https://github.com/appium/ruby_lib_core/commit/cc9e378eba22eb448feec764d6227aff1647aaba) Release 1.9.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_lib_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -198,6 +198,20 @@ dependencies:
|
|
198
198
|
- - ">="
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: '0'
|
201
|
+
- !ruby/object:Gem::Dependency
|
202
|
+
name: simplecov
|
203
|
+
requirement: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
type: :development
|
209
|
+
prerelease: false
|
210
|
+
version_requirements: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '0'
|
201
215
|
description: Minimal Ruby library for Appium.
|
202
216
|
email:
|
203
217
|
- fly.49.89.over@gmail.com
|
@@ -311,7 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
325
|
version: '0'
|
312
326
|
requirements: []
|
313
327
|
rubyforge_project:
|
314
|
-
rubygems_version: 2.
|
328
|
+
rubygems_version: 2.6.14
|
315
329
|
signing_key:
|
316
330
|
specification_version: 4
|
317
331
|
summary: Minimal Ruby library for Appium.
|