selenium-webdriver 3.12.0 → 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +11 -0
- data/LICENSE +1 -1
- data/lib/selenium/webdriver/chrome/bridge.rb +6 -1
- data/lib/selenium/webdriver/chrome/driver.rb +2 -1
- data/lib/selenium/webdriver/chrome/options.rb +4 -1
- data/lib/selenium/webdriver/chrome/profile.rb +1 -1
- data/lib/selenium/webdriver/common.rb +1 -0
- data/lib/selenium/webdriver/common/driver_extensions/downloads_files.rb +43 -0
- data/lib/selenium/webdriver/common/service.rb +1 -1
- data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
- data/lib/selenium/webdriver/remote/capabilities.rb +5 -2
- data/lib/selenium/webdriver/remote/w3c/capabilities.rb +1 -0
- data/lib/selenium/webdriver/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6e897acdd72c3d8d0e246985f91744dc7e6ea1e
|
4
|
+
data.tar.gz: 0fa878705e019d7af8ff26a10405ea3ebf38f5ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a20b24a1b499183f484a9efb95ba3cc58697eefc5d873d4f06a6189e70b0b56dac1409446bbd7854bd282451ab7d97d7811750593c4a6d0a25cd86ba2554dfc
|
7
|
+
data.tar.gz: 399698c8a1800e9e28c2f63cdf85c7f98ca24ec8aa3afb8b06a795de1111deb61b9e74276d961302d773469797f1caeece98add4f3051e9c5862ff8e3753456e
|
data/CHANGES
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
3.13.0 (2018-06-25)
|
2
|
+
===================
|
3
|
+
|
4
|
+
Ruby:
|
5
|
+
* Address warnings for redefined methods and uninitialized instance variables
|
6
|
+
|
7
|
+
Chrome:
|
8
|
+
* Chrome options capabilities updated to use goog:chromeOptions.
|
9
|
+
Note that Selenium now requires ChromeDriver v2.31 at minimum.
|
10
|
+
* Added ability to tell headless Chrome to save files using Driver#download_path= (thanks @pelly)
|
11
|
+
|
1
12
|
3.12.0 (2018-05-08)
|
2
13
|
===================
|
3
14
|
|
data/LICENSE
CHANGED
@@ -187,7 +187,7 @@
|
|
187
187
|
same "printed page" as the copyright notice for easier
|
188
188
|
identification within third-party archives.
|
189
189
|
|
190
|
-
Copyright
|
190
|
+
Copyright 2018 Software Freedom Conservancy (SFC)
|
191
191
|
|
192
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
193
193
|
you may not use this file except in compliance with the License.
|
@@ -22,7 +22,8 @@ module Selenium
|
|
22
22
|
|
23
23
|
COMMANDS = {
|
24
24
|
get_network_conditions: [:get, '/session/:session_id/chromium/network_conditions'.freeze],
|
25
|
-
set_network_conditions: [:post, '/session/:session_id/chromium/network_conditions'.freeze]
|
25
|
+
set_network_conditions: [:post, '/session/:session_id/chromium/network_conditions'.freeze],
|
26
|
+
send_command: [:post, '/session/:session_id/chromium/send_command'.freeze]
|
26
27
|
}.freeze
|
27
28
|
|
28
29
|
def commands(command)
|
@@ -33,6 +34,10 @@ module Selenium
|
|
33
34
|
execute :get_network_conditions
|
34
35
|
end
|
35
36
|
|
37
|
+
def send_command(command_params)
|
38
|
+
execute :send_command, {}, command_params
|
39
|
+
end
|
40
|
+
|
36
41
|
def network_conditions=(conditions)
|
37
42
|
execute :set_network_conditions, {}, {network_conditions: conditions}
|
38
43
|
end
|
@@ -29,6 +29,7 @@ module Selenium
|
|
29
29
|
include DriverExtensions::HasTouchScreen
|
30
30
|
include DriverExtensions::HasWebStorage
|
31
31
|
include DriverExtensions::TakesScreenshot
|
32
|
+
include DriverExtensions::DownloadsFiles
|
32
33
|
|
33
34
|
def initialize(opts = {})
|
34
35
|
opts[:desired_capabilities] = create_capabilities(opts)
|
@@ -102,7 +103,7 @@ module Selenium
|
|
102
103
|
end
|
103
104
|
|
104
105
|
options = options.as_json
|
105
|
-
caps
|
106
|
+
caps.merge!(options) unless options.empty?
|
106
107
|
|
107
108
|
caps[:proxy] = opts.delete(:proxy) if opts.key?(:proxy)
|
108
109
|
caps[:proxy] ||= opts.delete('proxy') if opts.key?('proxy')
|
@@ -22,6 +22,8 @@ module Selenium
|
|
22
22
|
attr_reader :args, :prefs, :options, :emulation, :extensions, :encoded_extensions
|
23
23
|
attr_accessor :binary
|
24
24
|
|
25
|
+
KEY = 'goog:chromeOptions'.freeze
|
26
|
+
|
25
27
|
#
|
26
28
|
# Create a new Options instance.
|
27
29
|
#
|
@@ -175,7 +177,8 @@ module Selenium
|
|
175
177
|
opts[:extensions] = extensions if extensions.any?
|
176
178
|
opts[:mobileEmulation] = @emulation unless @emulation.empty?
|
177
179
|
opts[:prefs] = @prefs unless @prefs.empty?
|
178
|
-
|
180
|
+
|
181
|
+
{KEY => opts}
|
179
182
|
end
|
180
183
|
end # Options
|
181
184
|
end # Chrome
|
@@ -50,6 +50,7 @@ require 'selenium/webdriver/common/html5/session_storage'
|
|
50
50
|
require 'selenium/webdriver/common/driver_extensions/takes_screenshot'
|
51
51
|
require 'selenium/webdriver/common/driver_extensions/rotatable'
|
52
52
|
require 'selenium/webdriver/common/driver_extensions/has_web_storage'
|
53
|
+
require 'selenium/webdriver/common/driver_extensions/downloads_files'
|
53
54
|
require 'selenium/webdriver/common/driver_extensions/has_location'
|
54
55
|
require 'selenium/webdriver/common/driver_extensions/has_session_id'
|
55
56
|
require 'selenium/webdriver/common/driver_extensions/has_touch_screen'
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
3
|
+
# distributed with this work for additional information
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
6
|
+
# "License"); you may not use this file except in compliance
|
7
|
+
# with the License. You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
|
18
|
+
module Selenium
|
19
|
+
module WebDriver
|
20
|
+
module DriverExtensions
|
21
|
+
module DownloadsFiles
|
22
|
+
|
23
|
+
#
|
24
|
+
# Sets download path for Chromium.
|
25
|
+
#
|
26
|
+
# @param [String] path
|
27
|
+
#
|
28
|
+
|
29
|
+
def download_path=(path)
|
30
|
+
params = {
|
31
|
+
'cmd' => 'Page.setDownloadBehavior',
|
32
|
+
'params' => {
|
33
|
+
'behavior' => 'allow',
|
34
|
+
'downloadPath' => path
|
35
|
+
}
|
36
|
+
}
|
37
|
+
@bridge.send_command(params)
|
38
|
+
end
|
39
|
+
|
40
|
+
end # DownloadsFiles
|
41
|
+
end # DriverExtensions
|
42
|
+
end # WebDriver
|
43
|
+
end # Selenium
|
Binary file
|
@@ -37,10 +37,13 @@ module Selenium
|
|
37
37
|
}.freeze
|
38
38
|
|
39
39
|
DEFAULTS.each_key do |key|
|
40
|
-
|
41
|
-
|
40
|
+
if key != :javascript_enabled
|
41
|
+
define_method key do
|
42
|
+
@capabilities.fetch(key)
|
43
|
+
end
|
42
44
|
end
|
43
45
|
|
46
|
+
next if key == :proxy
|
44
47
|
define_method "#{key}=" do |value|
|
45
48
|
@capabilities[key] = value
|
46
49
|
end
|
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.
|
4
|
+
version: 3.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Rodionov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/selenium/webdriver/common/alert.rb
|
140
140
|
- lib/selenium/webdriver/common/bridge_helper.rb
|
141
141
|
- lib/selenium/webdriver/common/driver.rb
|
142
|
+
- lib/selenium/webdriver/common/driver_extensions/downloads_files.rb
|
142
143
|
- lib/selenium/webdriver/common/driver_extensions/has_addons.rb
|
143
144
|
- lib/selenium/webdriver/common/driver_extensions/has_debugger.rb
|
144
145
|
- lib/selenium/webdriver/common/driver_extensions/has_location.rb
|