selenium-webdriver 3.142.0 → 3.142.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c657055dd2ca16d14d6b0623dd69ee7de563b3b
|
4
|
+
data.tar.gz: 440612d6a75c57b84e00b8665ca95be9fbbd1df1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fb071b1de096c35e05363ee76f2732a4a8b6101b5442da8ef511e21d59b8025429661314ceec35348604dc703451b5b2ce191aac1612e07cede6fe739ef4b85
|
7
|
+
data.tar.gz: f321a58fb2e9de33d686a3bfd8acb3b9f9c4e96741380cd9114d9070971b6c59ce098cc551bb3ec757283dfbf3f36d3cfbd94ae547a484abf183aae390543bcd
|
data/CHANGES
CHANGED
@@ -79,9 +79,11 @@ module Selenium
|
|
79
79
|
def add_backtrace(ex)
|
80
80
|
return unless error_payload.is_a?(Hash)
|
81
81
|
|
82
|
+
# Legacy Firefox returns String in ['value'], while we expect Hash.
|
83
|
+
# Use #dig when Firefox legacy is removed (4.0).
|
82
84
|
server_trace = error_payload[STACKTRACE_KEY] ||
|
83
85
|
error_payload[STACKTRACE_KEY.downcase] ||
|
84
|
-
error_payload
|
86
|
+
(error_payload['value'] && error_payload['value'][STACKTRACE_KEY])
|
85
87
|
return unless server_trace
|
86
88
|
|
87
89
|
backtrace = case server_trace
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium-webdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.142.
|
4
|
+
version: 3.142.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Rodionov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-05-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -246,7 +246,6 @@ files:
|
|
246
246
|
- lib/selenium/webdriver/common/manager.rb
|
247
247
|
- lib/selenium/webdriver/common/mouse.rb
|
248
248
|
- lib/selenium/webdriver/common/navigation.rb
|
249
|
-
- lib/selenium/webdriver/common/options.rb
|
250
249
|
- lib/selenium/webdriver/common/platform.rb
|
251
250
|
- lib/selenium/webdriver/common/port_prober.rb
|
252
251
|
- lib/selenium/webdriver/common/profile_helper.rb
|
@@ -261,7 +260,6 @@ files:
|
|
261
260
|
- lib/selenium/webdriver/common/touch_screen.rb
|
262
261
|
- lib/selenium/webdriver/common/w3c_action_builder.rb
|
263
262
|
- lib/selenium/webdriver/common/w3c_manager.rb
|
264
|
-
- lib/selenium/webdriver/common/w3c_options.rb
|
265
263
|
- lib/selenium/webdriver/common/wait.rb
|
266
264
|
- lib/selenium/webdriver/common/window.rb
|
267
265
|
- lib/selenium/webdriver/common/zipper.rb
|
@@ -1,177 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Licensed to the Software Freedom Conservancy (SFC) under one
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
5
|
-
# distributed with this work for additional information
|
6
|
-
# regarding copyright ownership. The SFC licenses this file
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
8
|
-
# "License"); you may not use this file except in compliance
|
9
|
-
# with the License. You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
14
|
-
# software distributed under the License is distributed on an
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16
|
-
# KIND, either express or implied. See the License for the
|
17
|
-
# specific language governing permissions and limitations
|
18
|
-
# under the License.
|
19
|
-
|
20
|
-
module Selenium
|
21
|
-
module WebDriver
|
22
|
-
class Options
|
23
|
-
#
|
24
|
-
# @api private
|
25
|
-
#
|
26
|
-
|
27
|
-
def initialize(bridge)
|
28
|
-
@bridge = bridge
|
29
|
-
end
|
30
|
-
|
31
|
-
#
|
32
|
-
# Add a cookie to the browser
|
33
|
-
#
|
34
|
-
# @param [Hash] opts the options to create a cookie with.
|
35
|
-
# @option opts [String] :name A name
|
36
|
-
# @option opts [String] :value A value
|
37
|
-
# @option opts [String] :path ('/') A path
|
38
|
-
# @option opts [String] :secure (false) A boolean
|
39
|
-
# @option opts [Time,DateTime,Numeric,nil] :expires (nil) Expiry date, either as a Time, DateTime, or seconds since epoch.
|
40
|
-
#
|
41
|
-
# @raise [ArgumentError] if :name or :value is not specified
|
42
|
-
#
|
43
|
-
|
44
|
-
def add_cookie(opts = {})
|
45
|
-
raise ArgumentError, 'name is required' unless opts[:name]
|
46
|
-
raise ArgumentError, 'value is required' unless opts[:value]
|
47
|
-
|
48
|
-
opts[:path] ||= '/'
|
49
|
-
opts[:secure] ||= false
|
50
|
-
|
51
|
-
obj = opts.delete(:expires)
|
52
|
-
opts[:expiry] = seconds_from(obj).to_i if obj
|
53
|
-
|
54
|
-
@bridge.add_cookie opts
|
55
|
-
end
|
56
|
-
|
57
|
-
#
|
58
|
-
# Get the cookie with the given name
|
59
|
-
#
|
60
|
-
# @param [String] name the name of the cookie
|
61
|
-
# @return [Hash, nil] the cookie, or nil if it wasn't found.
|
62
|
-
#
|
63
|
-
|
64
|
-
def cookie_named(name)
|
65
|
-
all_cookies.find { |c| c[:name] == name }
|
66
|
-
end
|
67
|
-
|
68
|
-
#
|
69
|
-
# Delete the cookie with the given name
|
70
|
-
#
|
71
|
-
# @param [String] name the name of the cookie to delete
|
72
|
-
#
|
73
|
-
|
74
|
-
def delete_cookie(name)
|
75
|
-
@bridge.delete_cookie name
|
76
|
-
end
|
77
|
-
|
78
|
-
#
|
79
|
-
# Delete all cookies
|
80
|
-
#
|
81
|
-
|
82
|
-
def delete_all_cookies
|
83
|
-
@bridge.delete_all_cookies
|
84
|
-
end
|
85
|
-
|
86
|
-
#
|
87
|
-
# Get all cookies
|
88
|
-
#
|
89
|
-
# @return [Array<Hash>] list of cookies
|
90
|
-
#
|
91
|
-
|
92
|
-
def all_cookies
|
93
|
-
@bridge.cookies.map { |cookie| convert_cookie(cookie) }
|
94
|
-
end
|
95
|
-
|
96
|
-
def timeouts
|
97
|
-
@timeouts ||= Timeouts.new(@bridge)
|
98
|
-
end
|
99
|
-
|
100
|
-
#
|
101
|
-
# @api beta This API may be changed or removed in a future release.
|
102
|
-
#
|
103
|
-
|
104
|
-
def logs
|
105
|
-
@logs ||= Logs.new(@bridge)
|
106
|
-
end
|
107
|
-
|
108
|
-
#
|
109
|
-
# Create a new top-level browsing context
|
110
|
-
# https://w3c.github.io/webdriver/#new-window
|
111
|
-
# @param type [Symbol] Supports two values: :tab and :window.
|
112
|
-
# Use :tab if you'd like the new window to share an OS-level window
|
113
|
-
# with the current browsing context.
|
114
|
-
# Use :window otherwise
|
115
|
-
# @return [String] The value of the window handle
|
116
|
-
#
|
117
|
-
def new_window(type = :tab)
|
118
|
-
case type
|
119
|
-
when :tab, :window
|
120
|
-
result = @bridge.new_window(type)
|
121
|
-
unless result.key?('handle')
|
122
|
-
raise UnknownError, "the driver did not return a handle. " \
|
123
|
-
"The returned result: #{result.inspect}"
|
124
|
-
end
|
125
|
-
result['handle']
|
126
|
-
else
|
127
|
-
raise ArgumentError, "invalid argument for type. Got: '#{type.inspect}'. " \
|
128
|
-
"Try :tab or :window"
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
#
|
133
|
-
# @api beta This API may be changed or removed in a future release.
|
134
|
-
#
|
135
|
-
|
136
|
-
def window
|
137
|
-
@window ||= Window.new(@bridge)
|
138
|
-
end
|
139
|
-
|
140
|
-
private
|
141
|
-
|
142
|
-
SECONDS_PER_DAY = 86_400.0
|
143
|
-
|
144
|
-
def datetime_at(int)
|
145
|
-
DateTime.civil(1970) + (int / SECONDS_PER_DAY)
|
146
|
-
end
|
147
|
-
|
148
|
-
def seconds_from(obj)
|
149
|
-
case obj
|
150
|
-
when Time
|
151
|
-
obj.to_f
|
152
|
-
when DateTime
|
153
|
-
(obj - DateTime.civil(1970)) * SECONDS_PER_DAY
|
154
|
-
when Numeric
|
155
|
-
obj
|
156
|
-
else
|
157
|
-
raise ArgumentError, "invalid value for expiration date: #{obj.inspect}"
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
|
-
def strip_port(str)
|
162
|
-
str.split(':', 2).first
|
163
|
-
end
|
164
|
-
|
165
|
-
def convert_cookie(cookie)
|
166
|
-
{
|
167
|
-
name: cookie['name'],
|
168
|
-
value: cookie['value'],
|
169
|
-
path: cookie['path'],
|
170
|
-
domain: cookie['domain'] && strip_port(cookie['domain']),
|
171
|
-
expires: cookie['expiry'] && datetime_at(cookie['expiry']),
|
172
|
-
secure: cookie['secure']
|
173
|
-
}
|
174
|
-
end
|
175
|
-
end # Options
|
176
|
-
end # WebDriver
|
177
|
-
end # Selenium
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Licensed to the Software Freedom Conservancy (SFC) under one
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
5
|
-
# distributed with this work for additional information
|
6
|
-
# regarding copyright ownership. The SFC licenses this file
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
8
|
-
# "License"); you may not use this file except in compliance
|
9
|
-
# with the License. You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
14
|
-
# software distributed under the License is distributed on an
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16
|
-
# KIND, either express or implied. See the License for the
|
17
|
-
# specific language governing permissions and limitations
|
18
|
-
# under the License.
|
19
|
-
|
20
|
-
module Selenium
|
21
|
-
module WebDriver
|
22
|
-
class W3COptions < Options
|
23
|
-
|
24
|
-
#
|
25
|
-
# Get the cookie with the given name
|
26
|
-
#
|
27
|
-
# @param [String] name the name of the cookie
|
28
|
-
# @return [Hash, nil] the cookie, or nil if it wasn't found.
|
29
|
-
#
|
30
|
-
|
31
|
-
def cookie_named(name)
|
32
|
-
convert_cookie(@bridge.cookie(name))
|
33
|
-
end
|
34
|
-
|
35
|
-
#
|
36
|
-
# Delete all cookies
|
37
|
-
#
|
38
|
-
|
39
|
-
def delete_all_cookies
|
40
|
-
@bridge.delete_all_cookies
|
41
|
-
end
|
42
|
-
|
43
|
-
end # WC3Options
|
44
|
-
end # WebDriver
|
45
|
-
end # Selenium
|