selenium-webdriver 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ 3.0.1 (2016-11-06)
2
+ ===================
3
+
4
+ Ruby:
5
+ * Always send JSON Wire Protocol commands to server instead of W3C commands
6
+
1
7
  3.0.0 (2016-10-13)
2
8
  ===================
3
9
 
@@ -0,0 +1,53 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ selenium-webdriver (3.0.1)
5
+ childprocess (~> 0.5)
6
+ rubyzip (~> 1.0)
7
+ websocket (~> 1.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ addressable (2.4.0)
13
+ builder (3.2.2)
14
+ childprocess (0.5.9)
15
+ ffi (~> 1.0, >= 1.0.11)
16
+ ci_reporter (1.9.3)
17
+ builder (>= 2.1.2)
18
+ crack (0.4.3)
19
+ safe_yaml (~> 1.0.0)
20
+ diff-lcs (1.2.5)
21
+ ffi (1.9.14)
22
+ hashdiff (0.3.0)
23
+ rack (1.6.4)
24
+ rspec (2.99.0)
25
+ rspec-core (~> 2.99.0)
26
+ rspec-expectations (~> 2.99.0)
27
+ rspec-mocks (~> 2.99.0)
28
+ rspec-core (2.99.2)
29
+ rspec-expectations (2.99.2)
30
+ diff-lcs (>= 1.1.3, < 2.0)
31
+ rspec-mocks (2.99.4)
32
+ rubyzip (1.2.0)
33
+ safe_yaml (1.0.4)
34
+ webmock (1.24.6)
35
+ addressable (>= 2.3.6)
36
+ crack (>= 0.3.2)
37
+ hashdiff
38
+ websocket (1.2.3)
39
+ yard (0.8.7.6)
40
+
41
+ PLATFORMS
42
+ ruby
43
+
44
+ DEPENDENCIES
45
+ ci_reporter (~> 1.6, >= 1.6.2)
46
+ rack (~> 1.0)
47
+ rspec (~> 2.99.0)
48
+ selenium-webdriver!
49
+ webmock (~> 1.7, >= 1.7.5)
50
+ yard (~> 0.8.7)
51
+
52
+ BUNDLED WITH
53
+ 1.13.6
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 [yyyy] [name of copyright owner]
190
+ Copyright 2016 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.
@@ -25,6 +25,7 @@ module Selenium
25
25
  def initialize(opts = {})
26
26
  port = opts.delete(:port) || Service::DEFAULT_PORT
27
27
  service_args = opts.delete(:service_args) || {}
28
+
28
29
  if opts[:service_log_path]
29
30
  service_args.merge!(service_log_path: opts.delete(:service_log_path))
30
31
  end
@@ -70,14 +71,18 @@ module Selenium
70
71
  chrome_options = caps['chromeOptions'] || caps[:chrome_options] || {}
71
72
  chrome_options['binary'] = Chrome.path if Chrome.path
72
73
  args = opts.delete(:args) || opts.delete(:switches) || []
74
+
73
75
  unless args.is_a? Array
74
76
  raise ArgumentError, ':args must be an Array of Strings'
75
77
  end
78
+
76
79
  chrome_options['args'] = args.map(&:to_s)
77
80
  profile = opts.delete(:profile).as_json if opts.key?(:profile)
81
+
78
82
  if profile && chrome_options['args'].none? { |arg| arg =~ /user-data-dir/}
79
83
  chrome_options['args'] << "--user-data-dir=#{profile[:directory]}"
80
84
  end
85
+
81
86
  chrome_options['extensions'] = profile[:extensions] if profile && profile[:extensions]
82
87
  chrome_options['detach'] = true if opts.delete(:detach)
83
88
  chrome_options['prefs'] = opts.delete(:prefs) if opts.key?(:prefs)
@@ -46,21 +46,23 @@ module Selenium
46
46
  bridge = case browser
47
47
  when :firefox, :ff
48
48
  if Remote::W3CCapabilities.w3c?(opts)
49
+ if opts[:desired_capabilities].is_a? Remote::Capabilities
50
+ opts[:desired_capabilities] = Remote::W3CCapabilities.new(opts[:desired_capabilities].send(:capabilities))
51
+ end
49
52
  Firefox::W3CBridge.new(opts)
50
53
  else
51
54
  Firefox::Bridge.new(opts)
52
55
  end
53
56
  when :remote
54
- if Remote::W3CCapabilities.w3c?(opts)
55
- Remote::W3CBridge.new(opts)
56
- else
57
- Remote::Bridge.new(opts)
58
- end
57
+ Remote::Bridge.new(opts)
59
58
  when :ie, :internet_explorer
60
59
  IE::Bridge.new(opts)
61
60
  when :chrome
62
61
  Chrome::Bridge.new(opts)
63
62
  when :edge
63
+ if opts[:desired_capabilities]
64
+ opts[:desired_capabilities] = Remote::W3CCapabilities.new(opts[:desired_capabilities].send(:capabilities))
65
+ end
64
66
  Edge::Bridge.new(opts)
65
67
  when :phantomjs
66
68
  PhantomJS::Bridge.new(opts)
@@ -146,9 +146,8 @@ module Selenium
146
146
  paths.each do |path|
147
147
  full_path = File.join(path, binary_name)
148
148
  full_path.tr!('\\', '/') if windows?
149
- exe = Dir.glob(full_path).first
150
- next unless exe
151
- return exe if File.executable?(exe)
149
+ exe = Dir.glob(full_path).select { |f| File.executable?(f) }.first
150
+ return exe if exe
152
151
  end
153
152
  end
154
153
 
@@ -68,12 +68,16 @@ module Selenium
68
68
  end
69
69
 
70
70
  def edge(opts = {})
71
- W3CCapabilities.edge(opts)
71
+ new({
72
+ browser_name: 'MicrosoftEdge',
73
+ platform: :windows,
74
+ javascript_enabled: true,
75
+ takes_screenshot: true,
76
+ css_selectors_enabled: true
77
+ }.merge(opts))
72
78
  end
73
79
 
74
80
  def firefox(opts = {})
75
- return W3CCapabilities.firefox(opts) unless opts[:marionette] == false
76
-
77
81
  new({
78
82
  browser_name: 'firefox',
79
83
  javascript_enabled: true,
@@ -85,7 +85,8 @@ module Selenium
85
85
  alias_method :ff, :firefox
86
86
 
87
87
  def w3c?(opts = {})
88
- !opts[:desired_capabilities].is_a?(Capabilities)
88
+ opts[:marioentte] != false &&
89
+ (!opts[:desired_capabilities] || opts[:desired_capabilities][:marionette] != false)
89
90
  end
90
91
 
91
92
  #
@@ -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.0.0'
8
+ s.version = '3.0.1'
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.0.0
5
+ version: 3.0.1
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: 2016-10-13 00:00:00 -05:00
14
+ date: 2016-11-07 00:00:00 -06:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -124,6 +124,7 @@ extra_rdoc_files: []
124
124
  files:
125
125
  - CHANGES
126
126
  - Gemfile
127
+ - Gemfile.lock
127
128
  - LICENSE
128
129
  - README.md
129
130
  - selenium-webdriver.gemspec