selenium-webdriver 3.5.2 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +15 -1
- data/lib/selenium/server.rb +1 -1
- data/lib/selenium/webdriver/common/mouse.rb +0 -0
- data/lib/selenium/webdriver/common/platform.rb +2 -2
- data/lib/selenium/webdriver/common/port_prober.rb +1 -0
- data/lib/selenium/webdriver/common/profile_helper.rb +1 -1
- data/lib/selenium/webdriver/common/proxy.rb +0 -0
- data/lib/selenium/webdriver/common/service.rb +1 -1
- data/lib/selenium/webdriver/common/touch_screen.rb +0 -0
- data/lib/selenium/webdriver/edge/bridge.rb +4 -4
- data/lib/selenium/webdriver/firefox/extension.rb +16 -2
- data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
- data/lib/selenium/webdriver/firefox/launcher.rb +5 -5
- data/lib/selenium/webdriver/firefox/marionette/bridge.rb +1 -1
- data/lib/selenium/webdriver/phantomjs/driver.rb +2 -0
- data/lib/selenium/webdriver/remote/capabilities.rb +10 -0
- data/lib/selenium/webdriver/remote/http/default.rb +0 -1
- data/lib/selenium/webdriver/remote/oss/bridge.rb +0 -0
- data/lib/selenium/webdriver/remote/w3c/bridge.rb +0 -0
- data/lib/selenium/webdriver/remote/w3c/capabilities.rb +0 -0
- data/lib/selenium/webdriver/support/color.rb +2 -2
- data/selenium-webdriver.gemspec +1 -1
- metadata +2 -3
- data/Gemfile.lock +0 -56
data/CHANGES
CHANGED
@@ -1,5 +1,19 @@
|
|
1
|
+
3.6.0 (2017-09-22)
|
2
|
+
==================
|
3
|
+
|
4
|
+
Edge:
|
5
|
+
* Fixed a bug when execute_script failed using server + Edge (issue #4651)
|
6
|
+
|
7
|
+
Firefox:
|
8
|
+
* Fixed a bug when web extension failed to install using profile class (issue #4093)
|
9
|
+
|
10
|
+
PhantomJS:
|
11
|
+
* Support is deprecated in favor of headless Chrome/Firefox or HTMLUnit.
|
12
|
+
PhantomJS is no longer actively developed, and support will eventually
|
13
|
+
be dropped.
|
14
|
+
|
1
15
|
3.5.2 (2017-09-07)
|
2
|
-
|
16
|
+
==================
|
3
17
|
|
4
18
|
Ruby:
|
5
19
|
* Removed platformVersion from W3C payload (issue #4641)
|
data/lib/selenium/server.rb
CHANGED
@@ -84,7 +84,7 @@ module Selenium
|
|
84
84
|
progress += segment.length
|
85
85
|
segment_count += 1
|
86
86
|
|
87
|
-
if segment_count % 15
|
87
|
+
if (segment_count % 15).zero?
|
88
88
|
percent = (progress.to_f / total.to_f) * 100
|
89
89
|
print "#{CL_RESET}Downloading #{download_file_name}: #{percent.to_i}% (#{progress} / #{total})"
|
90
90
|
segment_count = 0
|
File without changes
|
@@ -117,7 +117,7 @@ module Selenium
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def make_writable(file)
|
120
|
-
File.chmod
|
120
|
+
File.chmod 0o766, file
|
121
121
|
end
|
122
122
|
|
123
123
|
def assert_file(path)
|
@@ -208,7 +208,7 @@ module Selenium
|
|
208
208
|
end # WebDriver
|
209
209
|
end # Selenium
|
210
210
|
|
211
|
-
if
|
211
|
+
if $PROGRAM_NAME == __FILE__
|
212
212
|
p engine: Selenium::WebDriver::Platform.engine,
|
213
213
|
os: Selenium::WebDriver::Platform.os,
|
214
214
|
ruby_version: Selenium::WebDriver::Platform.ruby_version,
|
@@ -46,7 +46,7 @@ module Selenium
|
|
46
46
|
|
47
47
|
# TODO: must be a better way..
|
48
48
|
FileUtils.rm_rf tmp_directory
|
49
|
-
FileUtils.mkdir_p File.dirname(tmp_directory), mode:
|
49
|
+
FileUtils.mkdir_p File.dirname(tmp_directory), mode: 0o700
|
50
50
|
FileUtils.cp_r directory, tmp_directory
|
51
51
|
|
52
52
|
tmp_directory
|
File without changes
|
File without changes
|
@@ -24,10 +24,10 @@ module Selenium
|
|
24
24
|
|
25
25
|
def commands(command)
|
26
26
|
unsupported = %i[execute_script execute_async_script submit_element double_click
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
mouse_down mouse_up mouse_move_to click
|
28
|
+
send_keys_to_active_element get_window_handles get_current_window_handle
|
29
|
+
get_window_size set_window_size get_window_position set_window_position
|
30
|
+
maximize_window get_alert_text accept_alert dismiss_alert]
|
31
31
|
if unsupported.include? command
|
32
32
|
Remote::OSS::Bridge::COMMANDS[command]
|
33
33
|
else
|
@@ -38,10 +38,10 @@ module Selenium
|
|
38
38
|
|
39
39
|
def write_to(extensions_dir)
|
40
40
|
root_dir = create_root
|
41
|
-
ext_path = File.join extensions_dir,
|
41
|
+
ext_path = File.join extensions_dir, read_id(root_dir)
|
42
42
|
|
43
43
|
FileUtils.rm_rf ext_path
|
44
|
-
FileUtils.mkdir_p File.dirname(ext_path), mode:
|
44
|
+
FileUtils.mkdir_p File.dirname(ext_path), mode: 0o700
|
45
45
|
FileUtils.cp_r root_dir, ext_path
|
46
46
|
|
47
47
|
FileReaper.reap(root_dir) if @should_reap_root
|
@@ -62,8 +62,14 @@ module Selenium
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
def read_id(directory)
|
66
|
+
read_id_from_install_rdf(directory) || read_id_from_manifest_json(directory)
|
67
|
+
end
|
68
|
+
|
65
69
|
def read_id_from_install_rdf(directory)
|
66
70
|
rdf_path = File.join(directory, 'install.rdf')
|
71
|
+
return unless File.exist?(rdf_path)
|
72
|
+
|
67
73
|
doc = REXML::Document.new(File.read(rdf_path))
|
68
74
|
namespace = doc.root.namespaces.key(NAMESPACE)
|
69
75
|
|
@@ -77,6 +83,14 @@ module Selenium
|
|
77
83
|
|
78
84
|
raise Error::WebDriverError, "cannot locate extension id in #{rdf_path}"
|
79
85
|
end
|
86
|
+
|
87
|
+
def read_id_from_manifest_json(directory)
|
88
|
+
manifest_path = File.join(directory, 'manifest.json')
|
89
|
+
return unless File.exist?(manifest_path)
|
90
|
+
|
91
|
+
manifest = JSON.parse(File.read(manifest_path))
|
92
|
+
[manifest['name'].delete(' '), manifest['version']].join('@')
|
93
|
+
end
|
80
94
|
end # Extension
|
81
95
|
end # Firefox
|
82
96
|
end # WebDriver
|
Binary file
|
@@ -90,11 +90,11 @@ module Selenium
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def fetch_profile
|
93
|
-
if @profile_name
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
93
|
+
@profile = if @profile_name
|
94
|
+
Profile.from_name @profile_name
|
95
|
+
else
|
96
|
+
Profile.new
|
97
|
+
end
|
98
98
|
end
|
99
99
|
|
100
100
|
def assert_profile
|
@@ -30,6 +30,8 @@ module Selenium
|
|
30
30
|
include DriverExtensions::TakesScreenshot
|
31
31
|
|
32
32
|
def initialize(opts = {})
|
33
|
+
WebDriver.logger.deprecate 'Selenium support for PhantomJS', 'headless Chrome/Firefox or HTMLUnit'
|
34
|
+
|
33
35
|
opts[:desired_capabilities] ||= Remote::Capabilities.phantomjs
|
34
36
|
|
35
37
|
unless opts.key?(:url)
|
@@ -48,6 +48,15 @@ module Selenium
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
+
#
|
52
|
+
# Returns javascript_enabled capability.
|
53
|
+
# It is true if not set explicitly.
|
54
|
+
#
|
55
|
+
def javascript_enabled
|
56
|
+
javascript_enabled = @capabilities.fetch(:javascript_enabled)
|
57
|
+
javascript_enabled.nil? ? true : javascript_enabled
|
58
|
+
end
|
59
|
+
|
51
60
|
alias_method :css_selectors_enabled?, :css_selectors_enabled
|
52
61
|
alias_method :javascript_enabled?, :javascript_enabled
|
53
62
|
alias_method :native_events?, :native_events
|
@@ -111,6 +120,7 @@ module Selenium
|
|
111
120
|
alias_method :ie, :internet_explorer
|
112
121
|
|
113
122
|
def phantomjs(opts = {})
|
123
|
+
WebDriver.logger.deprecate 'Selenium support for PhantomJS', 'headless Chrome/Firefox or HTMLUnit'
|
114
124
|
new({
|
115
125
|
browser_name: 'phantomjs',
|
116
126
|
javascript_enabled: true,
|
File without changes
|
File without changes
|
File without changes
|
@@ -78,12 +78,12 @@ module Selenium
|
|
78
78
|
l = Float(l) / 100
|
79
79
|
a = Float(a || 1)
|
80
80
|
|
81
|
-
if s
|
81
|
+
if s.zero?
|
82
82
|
r = l
|
83
83
|
g = r
|
84
84
|
b = r
|
85
85
|
else
|
86
|
-
luminocity2 =
|
86
|
+
luminocity2 = l < 0.5 ? l * (1 + s) : l + s - l * s
|
87
87
|
luminocity1 = 2 * l - luminocity2
|
88
88
|
|
89
89
|
r = hue_to_rgb(luminocity1, luminocity2, h + 1.0 / 3.0)
|
data/selenium-webdriver.gemspec
CHANGED
@@ -5,7 +5,7 @@ raise "cwd must be #{root} when reading gemspec" if root != Dir.pwd
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = 'selenium-webdriver'
|
8
|
-
s.version = '3.
|
8
|
+
s.version = '3.6.0'
|
9
9
|
|
10
10
|
s.authors = ['Alex Rodionov', 'Titus Fortner']
|
11
11
|
s.email = ['p0deje@gmail.com', 'titusfortner@gmail.com']
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: selenium-webdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 3.
|
5
|
+
version: 3.6.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Alex Rodionov
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2017-09-
|
14
|
+
date: 2017-09-25 00:00:00 +02:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
@@ -96,7 +96,6 @@ extra_rdoc_files: []
|
|
96
96
|
files:
|
97
97
|
- CHANGES
|
98
98
|
- Gemfile
|
99
|
-
- Gemfile.lock
|
100
99
|
- LICENSE
|
101
100
|
- README.md
|
102
101
|
- selenium-webdriver.gemspec
|
data/Gemfile.lock
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
selenium-webdriver (3.5.1)
|
5
|
-
childprocess (~> 0.5)
|
6
|
-
rubyzip (~> 1.0)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
addressable (2.5.1)
|
12
|
-
public_suffix (~> 2.0, >= 2.0.2)
|
13
|
-
childprocess (0.7.1)
|
14
|
-
ffi (~> 1.0, >= 1.0.11)
|
15
|
-
crack (0.4.3)
|
16
|
-
safe_yaml (~> 1.0.0)
|
17
|
-
diff-lcs (1.3)
|
18
|
-
ffi (1.9.18)
|
19
|
-
ffi (1.9.18-x64-mingw32)
|
20
|
-
hashdiff (0.3.4)
|
21
|
-
public_suffix (2.0.5)
|
22
|
-
rack (1.6.8)
|
23
|
-
rspec (3.6.0)
|
24
|
-
rspec-core (~> 3.6.0)
|
25
|
-
rspec-expectations (~> 3.6.0)
|
26
|
-
rspec-mocks (~> 3.6.0)
|
27
|
-
rspec-core (3.6.0)
|
28
|
-
rspec-support (~> 3.6.0)
|
29
|
-
rspec-expectations (3.6.0)
|
30
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
-
rspec-support (~> 3.6.0)
|
32
|
-
rspec-mocks (3.6.0)
|
33
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
-
rspec-support (~> 3.6.0)
|
35
|
-
rspec-support (3.6.0)
|
36
|
-
rubyzip (1.2.1)
|
37
|
-
safe_yaml (1.0.4)
|
38
|
-
webmock (2.3.2)
|
39
|
-
addressable (>= 2.3.6)
|
40
|
-
crack (>= 0.3.2)
|
41
|
-
hashdiff
|
42
|
-
yard (0.9.9)
|
43
|
-
|
44
|
-
PLATFORMS
|
45
|
-
ruby
|
46
|
-
x64-mingw32
|
47
|
-
|
48
|
-
DEPENDENCIES
|
49
|
-
rack (~> 1.0)
|
50
|
-
rspec (~> 3.0)
|
51
|
-
selenium-webdriver!
|
52
|
-
webmock (~> 2.0)
|
53
|
-
yard (~> 0.9.9)
|
54
|
-
|
55
|
-
BUNDLED WITH
|
56
|
-
1.15.4
|