appium_lib 9.4.10 → 9.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/Rakefile +1 -1
- data/appium_lib.gemspec +1 -1
- data/docs/android_docs.md +237 -234
- data/docs/ios_docs.md +263 -260
- data/lib/appium_lib/common/command.rb +1 -1
- data/lib/appium_lib/common/patch.rb +10 -7
- data/lib/appium_lib/common/version.rb +2 -2
- data/lib/appium_lib/device/device.rb +1 -1
- data/lib/appium_lib/driver.rb +16 -15
- data/lib/appium_lib/ios/helper.rb +1 -1
- data/release_notes.md +13 -0
- metadata +10 -10
@@ -56,7 +56,7 @@ module Appium
|
|
56
56
|
# iOS
|
57
57
|
touch_id: [:post, 'session/:session_id/appium/simulator/touch_id'.freeze],
|
58
58
|
toggle_touch_id_enrollment: [:post, 'session/:session_id/appium/simulator/toggle_touch_id_enrollment'.freeze]
|
59
|
-
}.merge(COMMAND_NO_ARG).merge(::Selenium::WebDriver::Remote::Bridge::COMMANDS).freeze
|
59
|
+
}.merge(COMMAND_NO_ARG).merge(::Selenium::WebDriver::Remote::OSS::Bridge::COMMANDS).freeze
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
@@ -62,13 +62,14 @@ end # module Appium
|
|
62
62
|
#
|
63
63
|
# Requires from lib/selenium/webdriver/remote.rb
|
64
64
|
require 'selenium/webdriver/remote/capabilities'
|
65
|
-
require 'selenium/webdriver/remote/
|
65
|
+
require 'selenium/webdriver/remote/w3c/capabilities'
|
66
66
|
require 'selenium/webdriver/remote/bridge'
|
67
|
-
require 'selenium/webdriver/remote/
|
67
|
+
require 'selenium/webdriver/remote/oss/bridge'
|
68
|
+
require 'selenium/webdriver/remote/w3c/bridge'
|
68
69
|
require 'selenium/webdriver/remote/server_error'
|
69
70
|
require 'selenium/webdriver/remote/response'
|
70
|
-
require 'selenium/webdriver/remote/commands'
|
71
|
-
require 'selenium/webdriver/remote/
|
71
|
+
require 'selenium/webdriver/remote/oss/commands'
|
72
|
+
require 'selenium/webdriver/remote/w3c/commands'
|
72
73
|
require 'selenium/webdriver/remote/http/common'
|
73
74
|
require 'selenium/webdriver/remote/http/default'
|
74
75
|
|
@@ -79,7 +80,8 @@ require 'selenium/webdriver/remote/http/default'
|
|
79
80
|
def patch_webdriver_bridge
|
80
81
|
Selenium::WebDriver::Remote::Bridge.class_eval do
|
81
82
|
# Code from lib/selenium/webdriver/remote/bridge.rb
|
82
|
-
|
83
|
+
|
84
|
+
def execute(command, opts = {}, command_hash = nil)
|
83
85
|
verb, path = commands(command) || raise(ArgumentError, "unknown command: #{command.inspect}")
|
84
86
|
path = path.dup
|
85
87
|
|
@@ -130,7 +132,7 @@ def patch_webdriver_bridge
|
|
130
132
|
delay = $driver.global_webdriver_http_sleep
|
131
133
|
sleep delay if !delay.nil? && delay > 0
|
132
134
|
# Appium::Logger.info "verb: #{verb}, path #{path}, command_hash #{command_hash.to_json}"
|
133
|
-
http.call
|
135
|
+
http.call(verb, path, command_hash)
|
134
136
|
end # def
|
135
137
|
end # class
|
136
138
|
end
|
@@ -146,6 +148,7 @@ class Selenium::WebDriver::Remote::Response
|
|
146
148
|
case val
|
147
149
|
when Hash
|
148
150
|
msg = val['origValue'] || val['message'] or return 'unknown error'
|
151
|
+
msg << ": #{val['alert']['text'].inspect}" if val['alert'].is_a?(Hash) && val['alert']['text']
|
149
152
|
msg << " (#{val['class']})" if val['class']
|
150
153
|
when String
|
151
154
|
msg = val
|
@@ -163,7 +166,7 @@ class Selenium::WebDriver::Remote::Http::Common # rubocop:disable Style/ClassAnd
|
|
163
166
|
end
|
164
167
|
|
165
168
|
def patch_remote_driver_commands
|
166
|
-
Selenium::WebDriver::Remote::Bridge.class_eval do
|
169
|
+
Selenium::WebDriver::Remote::OSS::Bridge.class_eval do
|
167
170
|
def commands(command)
|
168
171
|
::Appium::Driver::Commands::COMMAND[command]
|
169
172
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Appium
|
2
2
|
# Version and Date are defined on the 'Appium' module, not 'Appium::Common'
|
3
|
-
VERSION = '9.
|
4
|
-
DATE = '2017-
|
3
|
+
VERSION = '9.5.0'.freeze unless defined? ::Appium::VERSION
|
4
|
+
DATE = '2017-08-05'.freeze unless defined? ::Appium::DATE
|
5
5
|
end
|
@@ -437,7 +437,7 @@ module Appium
|
|
437
437
|
|
438
438
|
# @private
|
439
439
|
def create_bridge_command(method)
|
440
|
-
Selenium::WebDriver::Remote::Bridge.class_eval do
|
440
|
+
Selenium::WebDriver::Remote::OSS::Bridge.class_eval do
|
441
441
|
block_given? ? class_eval(&Proc.new) : define_method(method) { execute method }
|
442
442
|
end
|
443
443
|
end
|
data/lib/appium_lib/driver.rb
CHANGED
@@ -255,19 +255,12 @@ module Appium
|
|
255
255
|
|
256
256
|
class Driver
|
257
257
|
module Capabilities
|
258
|
-
# except for browser_name, default capability is equal to ::Selenium::WebDriver::Remote::Capabilities.firefox
|
259
|
-
# Because Selenium::WebDriver::Remote::Bridge uses Capabilities.firefox by default
|
260
|
-
# https://github.com/SeleniumHQ/selenium/blob/selenium-3.0.1/rb/lib/selenium/webdriver/remote/bridge.rb#L67
|
261
258
|
# @param [Hash] opts_caps Capabilities for Appium server. All capability keys are converted to lowerCamelCase when
|
262
259
|
# this client sends capabilities to Appium server as JSON format.
|
263
|
-
# @return [Selenium::WebDriver::Remote::Capabilities] Return instance of
|
260
|
+
# @return [::Selenium::WebDriver::Remote::W3C::Capabilities] Return instance of Appium::Driver::Capabilities
|
261
|
+
# inherited ::Selenium::WebDriver::Remote::W3C::Capabilities
|
264
262
|
def self.init_caps_for_appium(opts_caps = {})
|
265
|
-
|
266
|
-
javascript_enabled: true,
|
267
|
-
takes_screenshot: true,
|
268
|
-
css_selectors_enabled: true
|
269
|
-
}.merge(opts_caps)
|
270
|
-
::Selenium::WebDriver::Remote::Capabilities.new(default_caps_opts_firefox)
|
263
|
+
::Selenium::WebDriver::Remote::W3C::Capabilities.new(opts_caps)
|
271
264
|
end
|
272
265
|
end
|
273
266
|
end
|
@@ -644,14 +637,22 @@ module Appium
|
|
644
637
|
# wait_timeout: 30
|
645
638
|
# }
|
646
639
|
# }
|
647
|
-
#
|
648
|
-
# Appium::Driver.new(opts).start_driver(custom_http_client)
|
640
|
+
# Appium::Driver.new(opts).start_driver
|
649
641
|
#
|
642
|
+
# @option http_client_ops [Hash] :http_client Custom HTTP Client
|
643
|
+
# @option http_client_ops [Hash] :open_timeout Custom open timeout for http client.
|
644
|
+
# @option http_client_ops [Hash] :read_timeout Custom read timeout for http client.
|
650
645
|
# @return [Selenium::WebDriver] the new global driver
|
651
|
-
def start_driver(http_client
|
652
|
-
Selenium::WebDriver::Remote::Http::Default.new(open_timeout: 999_999, read_timeout: 999_999))
|
646
|
+
def start_driver(http_client_ops = { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
|
653
647
|
# open_timeout and read_timeout are explicit wait.
|
654
|
-
|
648
|
+
open_timeout = http_client_ops.delete(:open_timeout)
|
649
|
+
read_timeout = http_client_ops.delete(:read_timeout)
|
650
|
+
|
651
|
+
http_client = http_client_ops.delete(:http_client)
|
652
|
+
@http_client ||= http_client ? http_client : Selenium::WebDriver::Remote::Http::Default.new
|
653
|
+
|
654
|
+
@http_client.open_timeout = open_timeout if open_timeout
|
655
|
+
@http_client.read_timeout = read_timeout if read_timeout
|
655
656
|
|
656
657
|
begin
|
657
658
|
driver_quit
|
@@ -92,7 +92,7 @@ module Appium
|
|
92
92
|
visible = (type.downcase.include? class_name).to_s if class_name
|
93
93
|
if visible && visible == 'true'
|
94
94
|
|
95
|
-
_print_attr(type, name, label, value, hint, visible)
|
95
|
+
UITestElementsPrinter.new._print_attr(type, name, label, value, hint, visible)
|
96
96
|
|
97
97
|
# there may be many ids with the same value.
|
98
98
|
# output all exact matches.
|
data/release_notes.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
#### v9.4.10 2017-07-30
|
2
|
+
|
3
|
+
- [6eae1b6](https://github.com/appium/ruby_lib/commit/6eae1b6412ba8dc6c967a44dd9a987944c8e6444) [Release 9 4 10 (#626)](https://github.com/appium/ruby_lib/issues/626)
|
4
|
+
- [3df1b2d](https://github.com/appium/ruby_lib/commit/3df1b2d212f1f0ea9975b80009894e4fa138a414) [refactor: search contexts and its structure (#625)](https://github.com/appium/ruby_lib/issues/625)
|
5
|
+
- [673bdef](https://github.com/appium/ruby_lib/commit/673bdeffba6946e932096e0bc44d5e8faaf3ec07) [refactor: reduce complexity in android helper (#624)](https://github.com/appium/ruby_lib/issues/624)
|
6
|
+
- [d5c9118](https://github.com/appium/ruby_lib/commit/d5c9118ca06f2e3daf3ea41ebe9aaf5769e7493e) [Create ISSUE_TEMPLATE.md (#623)](https://github.com/appium/ruby_lib/issues/623)
|
7
|
+
- [47a5ba9](https://github.com/appium/ruby_lib/commit/47a5ba98ed2ce7387382c6fbc38721a72331a8d1) [refactor: use element.rect for Selenium Webdriver 3.4.0+ (#621)](https://github.com/appium/ruby_lib/issues/621)
|
8
|
+
- [d834c97](https://github.com/appium/ruby_lib/commit/d834c97780e7e95d1488c57a6fae7e751db5fe6f) [feature: add react native app (#619)](https://github.com/appium/ruby_lib/issues/619)
|
9
|
+
- [947106f](https://github.com/appium/ruby_lib/commit/947106fdc5a8d2653b65cfa473a4eb1111835085) [feature: add commit message format to handle release note smarter (#616)](https://github.com/appium/ruby_lib/issues/616)
|
10
|
+
- [d126ba1](https://github.com/appium/ruby_lib/commit/d126ba14ba0533f3a54cb51a849443adbcf84e91) [add progname (#615)](https://github.com/appium/ruby_lib/issues/615)
|
11
|
+
- [9c4d555](https://github.com/appium/ruby_lib/commit/9c4d555c97ad99bbd6f0c8e359713fac959f8717) [remove rails/duplicable and related methods (#614)](https://github.com/appium/ruby_lib/issues/614)
|
12
|
+
|
13
|
+
|
1
14
|
#### v9.4.9 2017-07-01
|
2
15
|
|
3
16
|
- [cfe84fc](https://github.com/appium/ruby_lib/commit/cfe84fc009c418eebe95babf8160f36209f9fecf) [Release 9 4 9 (#613)](https://github.com/appium/ruby_lib/issues/613)
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.4
|
20
|
-
- - "<="
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: '3.4'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.4.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 3.0.4
|
30
|
-
- - "<="
|
27
|
+
- - "~>"
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: '3.4'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.4.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: awesome_print
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|