selenium-webdriver 2.53.4 → 3.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. data/CHANGES +24 -18
  2. data/README.md +2 -3
  3. data/lib/selenium/server.rb +64 -68
  4. data/lib/selenium/webdriver.rb +5 -9
  5. data/lib/selenium/webdriver/chrome.rb +18 -3
  6. data/lib/selenium/webdriver/chrome/bridge.rb +13 -16
  7. data/lib/selenium/webdriver/chrome/profile.rb +7 -9
  8. data/lib/selenium/webdriver/chrome/service.rb +8 -84
  9. data/lib/selenium/webdriver/common.rb +1 -2
  10. data/lib/selenium/webdriver/common/action_builder.rb +28 -38
  11. data/lib/selenium/webdriver/common/alert.rb +7 -10
  12. data/lib/selenium/webdriver/common/bridge_helper.rb +10 -15
  13. data/lib/selenium/webdriver/common/driver.rb +19 -28
  14. data/lib/selenium/webdriver/common/driver_extensions/has_input_devices.rb +0 -3
  15. data/lib/selenium/webdriver/common/driver_extensions/has_location.rb +4 -6
  16. data/lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb +4 -5
  17. data/lib/selenium/webdriver/common/driver_extensions/has_remote_status.rb +0 -2
  18. data/lib/selenium/webdriver/common/driver_extensions/has_session_id.rb +0 -2
  19. data/lib/selenium/webdriver/common/driver_extensions/has_touch_screen.rb +0 -2
  20. data/lib/selenium/webdriver/common/driver_extensions/has_web_storage.rb +0 -3
  21. data/lib/selenium/webdriver/common/driver_extensions/rotatable.rb +3 -6
  22. data/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb +2 -5
  23. data/lib/selenium/webdriver/common/driver_extensions/uploads_files.rb +2 -5
  24. data/lib/selenium/webdriver/common/element.rb +27 -29
  25. data/lib/selenium/webdriver/common/error.rb +17 -20
  26. data/lib/selenium/webdriver/common/file_reaper.rb +3 -9
  27. data/lib/selenium/webdriver/common/html5/local_storage.rb +6 -8
  28. data/lib/selenium/webdriver/common/html5/session_storage.rb +6 -8
  29. data/lib/selenium/webdriver/common/html5/shared_web_storage.rb +6 -15
  30. data/lib/selenium/webdriver/common/keyboard.rb +7 -12
  31. data/lib/selenium/webdriver/common/keys.rb +67 -69
  32. data/lib/selenium/webdriver/common/log_entry.rb +3 -4
  33. data/lib/selenium/webdriver/common/logs.rb +2 -4
  34. data/lib/selenium/webdriver/common/mouse.rb +9 -12
  35. data/lib/selenium/webdriver/common/navigation.rb +2 -4
  36. data/lib/selenium/webdriver/common/options.rb +16 -19
  37. data/lib/selenium/webdriver/common/platform.rb +61 -90
  38. data/lib/selenium/webdriver/common/port_prober.rb +1 -2
  39. data/lib/selenium/webdriver/common/profile_helper.rb +5 -8
  40. data/lib/selenium/webdriver/common/proxy.rb +58 -70
  41. data/lib/selenium/webdriver/common/search_context.rb +15 -19
  42. data/lib/selenium/webdriver/common/service.rb +127 -0
  43. data/lib/selenium/webdriver/common/socket_lock.rb +5 -11
  44. data/lib/selenium/webdriver/common/socket_poller.rb +4 -9
  45. data/lib/selenium/webdriver/common/target_locator.rb +11 -13
  46. data/lib/selenium/webdriver/common/timeouts.rb +4 -6
  47. data/lib/selenium/webdriver/common/touch_action_builder.rb +2 -4
  48. data/lib/selenium/webdriver/common/touch_screen.rb +15 -18
  49. data/lib/selenium/webdriver/common/w3c_error.rb +3 -6
  50. data/lib/selenium/webdriver/common/wait.rb +6 -11
  51. data/lib/selenium/webdriver/common/window.rb +12 -15
  52. data/lib/selenium/webdriver/common/zipper.rb +6 -8
  53. data/lib/selenium/webdriver/edge.rb +18 -3
  54. data/lib/selenium/webdriver/edge/bridge.rb +11 -16
  55. data/lib/selenium/webdriver/edge/legacy_support.rb +38 -39
  56. data/lib/selenium/webdriver/edge/service.rb +8 -82
  57. data/lib/selenium/webdriver/firefox.rb +25 -6
  58. data/lib/selenium/webdriver/firefox/binary.rb +37 -53
  59. data/lib/selenium/webdriver/firefox/bridge.rb +3 -6
  60. data/lib/selenium/webdriver/firefox/extension.rb +4 -6
  61. data/lib/selenium/webdriver/firefox/extension/prefs.json +1 -10
  62. data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
  63. data/lib/selenium/webdriver/firefox/launcher.rb +8 -11
  64. data/lib/selenium/webdriver/firefox/profile.rb +40 -42
  65. data/lib/selenium/webdriver/firefox/profiles_ini.rb +8 -15
  66. data/lib/selenium/webdriver/firefox/service.rb +23 -79
  67. data/lib/selenium/webdriver/firefox/util.rb +0 -2
  68. data/lib/selenium/webdriver/firefox/w3c_bridge.rb +2 -4
  69. data/lib/selenium/webdriver/ie.rb +16 -7
  70. data/lib/selenium/webdriver/ie/bridge.rb +16 -23
  71. data/lib/selenium/webdriver/{iphone.rb → ie/service.rb} +26 -4
  72. data/lib/selenium/webdriver/phantomjs.rb +8 -3
  73. data/lib/selenium/webdriver/phantomjs/bridge.rb +9 -11
  74. data/lib/selenium/webdriver/phantomjs/service.rb +17 -81
  75. data/lib/selenium/webdriver/remote.rb +0 -2
  76. data/lib/selenium/webdriver/remote/bridge.rb +193 -191
  77. data/lib/selenium/webdriver/remote/capabilities.rb +60 -90
  78. data/lib/selenium/webdriver/remote/commands.rb +197 -192
  79. data/lib/selenium/webdriver/remote/http/common.rb +15 -13
  80. data/lib/selenium/webdriver/remote/http/curb.rb +5 -9
  81. data/lib/selenium/webdriver/remote/http/default.rb +32 -37
  82. data/lib/selenium/webdriver/remote/http/persistent.rb +4 -6
  83. data/lib/selenium/webdriver/remote/response.rb +13 -21
  84. data/lib/selenium/webdriver/remote/server_error.rb +1 -3
  85. data/lib/selenium/webdriver/remote/w3c_bridge.rb +200 -195
  86. data/lib/selenium/webdriver/remote/w3c_capabilities.rb +38 -46
  87. data/lib/selenium/webdriver/remote/w3c_commands.rb +116 -113
  88. data/lib/selenium/webdriver/safari.rb +23 -7
  89. data/lib/selenium/{client/javascript_frameworks/jquery.rb → webdriver/safari/apple_bridge.rb} +28 -9
  90. data/lib/selenium/webdriver/safari/browser.rb +0 -2
  91. data/lib/selenium/webdriver/safari/{bridge.rb → legacy_bridge.rb} +12 -9
  92. data/lib/selenium/webdriver/safari/options.rb +3 -4
  93. data/lib/selenium/webdriver/safari/resources/client.js +56 -7255
  94. data/lib/selenium/webdriver/safari/server.rb +18 -24
  95. data/lib/selenium/{client/javascript_frameworks/prototype.rb → webdriver/safari/service.rb} +27 -9
  96. data/lib/selenium/webdriver/support.rb +1 -0
  97. data/lib/selenium/webdriver/support/abstract_event_listener.rb +17 -2
  98. data/lib/selenium/webdriver/support/block_event_listener.rb +1 -3
  99. data/lib/selenium/webdriver/support/color.rb +55 -38
  100. data/lib/selenium/webdriver/{android.rb → support/escaper.rb} +19 -4
  101. data/lib/selenium/webdriver/support/event_firing_bridge.rb +36 -38
  102. data/lib/selenium/webdriver/support/select.rb +33 -84
  103. data/selenium-webdriver.gemspec +23 -23
  104. metadata +19 -30
  105. data/lib/selenium-client.rb +0 -21
  106. data/lib/selenium/client.rb +0 -57
  107. data/lib/selenium/client/base.rb +0 -151
  108. data/lib/selenium/client/driver.rb +0 -29
  109. data/lib/selenium/client/errors.rb +0 -28
  110. data/lib/selenium/client/extensions.rb +0 -132
  111. data/lib/selenium/client/idiomatic.rb +0 -507
  112. data/lib/selenium/client/javascript_expression_builder.rb +0 -135
  113. data/lib/selenium/client/legacy_driver.rb +0 -1722
  114. data/lib/selenium/client/protocol.rb +0 -123
  115. data/lib/selenium/client/selenium_helper.rb +0 -49
  116. data/lib/selenium/rake/server_task.rb +0 -176
  117. data/lib/selenium/webdriver/android/bridge.rb +0 -68
  118. data/lib/selenium/webdriver/common/core_ext/base64.rb +0 -28
  119. data/lib/selenium/webdriver/common/core_ext/dir.rb +0 -61
  120. data/lib/selenium/webdriver/common/html5/location.rb +0 -19
  121. data/lib/selenium/webdriver/ie/server.rb +0 -133
  122. data/lib/selenium/webdriver/iphone/bridge.rb +0 -64
@@ -23,12 +23,12 @@ module Selenium
23
23
  attr_reader :level, :timestamp, :message
24
24
 
25
25
  def initialize(level, timestamp, message)
26
- @level = level
26
+ @level = level
27
27
  @timestamp = timestamp
28
- @message = message
28
+ @message = message
29
29
  end
30
30
 
31
- def as_json(opts = nil)
31
+ def as_json(*)
32
32
  {
33
33
  'level' => level,
34
34
  'timestamp' => timestamp,
@@ -43,7 +43,6 @@ module Selenium
43
43
  def time
44
44
  Time.at timestamp / 1000
45
45
  end
46
-
47
46
  end # LogEntry
48
47
  end # WebDriver
49
48
  end # Selenium
@@ -20,7 +20,6 @@
20
20
  module Selenium
21
21
  module WebDriver
22
22
  class Logs
23
-
24
23
  #
25
24
  # @api private
26
25
  #
@@ -30,13 +29,12 @@ module Selenium
30
29
  end
31
30
 
32
31
  def get(type)
33
- @bridge.getLog type
32
+ @bridge.log type
34
33
  end
35
34
 
36
35
  def available_types
37
- @bridge.getAvailableLogTypes
36
+ @bridge.available_log_types
38
37
  end
39
-
40
38
  end # Logs
41
39
  end # WebDriver
42
40
  end # Selenium
@@ -19,14 +19,12 @@
19
19
 
20
20
  module Selenium
21
21
  module WebDriver
22
-
23
22
  #
24
23
  # @api private
25
24
  # @see ActionBuilder
26
25
  #
27
26
 
28
27
  class Mouse
29
-
30
28
  def initialize(bridge)
31
29
  @bridge = bridge
32
30
  end
@@ -38,22 +36,22 @@ module Selenium
38
36
 
39
37
  def double_click(element = nil)
40
38
  move_if_needed element
41
- @bridge.doubleClick
39
+ @bridge.double_click
42
40
  end
43
41
 
44
42
  def context_click(element = nil)
45
43
  move_if_needed element
46
- @bridge.contextClick
44
+ @bridge.context_click
47
45
  end
48
46
 
49
47
  def down(element = nil)
50
48
  move_if_needed element
51
- @bridge.mouseDown
49
+ @bridge.mouse_down
52
50
  end
53
51
 
54
52
  def up(element = nil)
55
53
  move_if_needed element
56
- @bridge.mouseUp
54
+ @bridge.mouse_up
57
55
  end
58
56
 
59
57
  #
@@ -68,11 +66,11 @@ module Selenium
68
66
  def move_to(element, right_by = nil, down_by = nil)
69
67
  assert_element element
70
68
 
71
- @bridge.mouseMoveTo element.ref, right_by, down_by
69
+ @bridge.mouse_move_to element.ref, right_by, down_by
72
70
  end
73
71
 
74
72
  def move_by(right_by, down_by)
75
- @bridge.mouseMoveTo nil, Integer(right_by), Integer(down_by)
73
+ @bridge.mouse_move_to nil, Integer(right_by), Integer(down_by)
76
74
  end
77
75
 
78
76
  private
@@ -82,10 +80,9 @@ module Selenium
82
80
  end
83
81
 
84
82
  def assert_element(element)
85
- unless element.kind_of? Element
86
- raise TypeError, "expected #{Element}, got #{element.inspect}:#{element.class}"
87
- end
83
+ return if element.is_a? Element
84
+ raise TypeError, "expected #{Element}, got #{element.inspect}:#{element.class}"
88
85
  end
89
86
  end # Mouse
90
87
  end # WebDriver
91
- end # Selenium
88
+ end # Selenium
@@ -20,7 +20,6 @@
20
20
  module Selenium
21
21
  module WebDriver
22
22
  class Navigation
23
-
24
23
  def initialize(bridge)
25
24
  @bridge = bridge
26
25
  end
@@ -38,7 +37,7 @@ module Selenium
38
37
  #
39
38
 
40
39
  def back
41
- @bridge.goBack
40
+ @bridge.go_back
42
41
  end
43
42
 
44
43
  #
@@ -46,7 +45,7 @@ module Selenium
46
45
  #
47
46
 
48
47
  def forward
49
- @bridge.goForward
48
+ @bridge.go_forward
50
49
  end
51
50
 
52
51
  #
@@ -56,7 +55,6 @@ module Selenium
56
55
  def refresh
57
56
  @bridge.refresh
58
57
  end
59
-
60
58
  end # Navigation
61
59
  end # WebDriver
62
60
  end # Selenium
@@ -20,7 +20,6 @@
20
20
  module Selenium
21
21
  module WebDriver
22
22
  class Options
23
-
24
23
  #
25
24
  # @api private
26
25
  #
@@ -43,17 +42,16 @@ module Selenium
43
42
  #
44
43
 
45
44
  def add_cookie(opts = {})
46
- raise ArgumentError, "name is required" unless opts[:name]
47
- raise ArgumentError, "value is required" unless opts[:value]
45
+ raise ArgumentError, 'name is required' unless opts[:name]
46
+ raise ArgumentError, 'value is required' unless opts[:value]
48
47
 
49
- opts[:path] ||= "/"
48
+ opts[:path] ||= '/'
50
49
  opts[:secure] ||= false
51
50
 
52
- if obj = opts.delete(:expires)
53
- opts[:expiry] = seconds_from(obj).to_i
54
- end
51
+ obj = opts.delete(:expires)
52
+ opts[:expiry] = seconds_from(obj).to_i if obj
55
53
 
56
- @bridge.addCookie opts
54
+ @bridge.add_cookie opts
57
55
  end
58
56
 
59
57
  #
@@ -74,7 +72,7 @@ module Selenium
74
72
  #
75
73
 
76
74
  def delete_cookie(name)
77
- @bridge.deleteCookie name
75
+ @bridge.delete_cookie name
78
76
  end
79
77
 
80
78
  #
@@ -82,7 +80,7 @@ module Selenium
82
80
  #
83
81
 
84
82
  def delete_all_cookies
85
- @bridge.deleteAllCookies
83
+ @bridge.delete_all_cookies
86
84
  end
87
85
 
88
86
  #
@@ -92,14 +90,14 @@ module Selenium
92
90
  #
93
91
 
94
92
  def all_cookies
95
- @bridge.getAllCookies.map do |cookie|
93
+ @bridge.cookies.map do |cookie|
96
94
  {
97
- :name => cookie["name"],
98
- :value => cookie["value"],
99
- :path => cookie["path"],
100
- :domain => cookie["domain"] && strip_port(cookie["domain"]),
101
- :expires => cookie["expiry"] && datetime_at(cookie['expiry']),
102
- :secure => cookie["secure"]
95
+ name: cookie['name'],
96
+ value: cookie['value'],
97
+ path: cookie['path'],
98
+ domain: cookie['domain'] && strip_port(cookie['domain']),
99
+ expires: cookie['expiry'] && datetime_at(cookie['expiry']),
100
+ secure: cookie['secure']
103
101
  }
104
102
  end
105
103
  end
@@ -146,9 +144,8 @@ module Selenium
146
144
  end
147
145
 
148
146
  def strip_port(str)
149
- str.split(":", 2).first
147
+ str.split(':', 2).first
150
148
  end
151
-
152
149
  end # Options
153
150
  end # WebDriver
154
151
  end # Selenium
@@ -22,10 +22,8 @@ require 'socket'
22
22
 
23
23
  module Selenium
24
24
  module WebDriver
25
-
26
25
  # @api private
27
26
  module Platform
28
-
29
27
  module_function
30
28
 
31
29
  def home
@@ -34,53 +32,40 @@ module Selenium
34
32
  end
35
33
 
36
34
  def engine
37
- @engine ||= (
38
- if defined? RUBY_ENGINE
39
- RUBY_ENGINE.to_sym
40
- else
41
- :ruby
42
- end
43
- )
35
+ @engine ||= defined?(RUBY_ENGINE) ? RUBY_ENGINE.to_sym : :ruby
44
36
  end
45
37
 
46
38
  def os
47
- @os ||= (
48
- host_os = RbConfig::CONFIG['host_os']
49
- case host_os
50
- when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
51
- :windows
52
- when /darwin|mac os/
53
- :macosx
54
- when /linux/
55
- :linux
56
- when /solaris|bsd/
57
- :unix
58
- else
59
- raise Error::WebDriverError, "unknown os: #{host_os.inspect}"
60
- end
61
- )
39
+ host_os = RbConfig::CONFIG['host_os']
40
+ @os ||= case host_os
41
+ when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
42
+ :windows
43
+ when /darwin|mac os/
44
+ :macosx
45
+ when /linux/
46
+ :linux
47
+ when /solaris|bsd/
48
+ :unix
49
+ else
50
+ raise Error::WebDriverError, "unknown os: #{host_os.inspect}"
51
+ end
62
52
  end
63
53
 
64
54
  def ci
65
- if ENV['TRAVIS']
66
- :travis
67
- elsif ENV['JENKINS']
68
- :jenkins
69
- end
55
+ return :travis if ENV['TRAVIS']
56
+ :jenkins if ENV['JENKINS']
70
57
  end
71
58
 
72
59
  def bitsize
73
- @bitsize ||= (
74
- if defined?(FFI::Platform::ADDRESS_SIZE)
75
- FFI::Platform::ADDRESS_SIZE
76
- elsif defined?(FFI)
77
- FFI.type_size(:pointer) == 4 ? 32 : 64
78
- elsif jruby?
79
- Integer(ENV_JAVA['sun.arch.data.model'])
80
- else
81
- 1.size == 4 ? 32 : 64
82
- end
83
- )
60
+ @bitsize ||= if defined?(FFI::Platform::ADDRESS_SIZE)
61
+ FFI::Platform::ADDRESS_SIZE
62
+ elsif defined?(FFI)
63
+ FFI.type_size(:pointer) == 4 ? 32 : 64
64
+ elsif jruby?
65
+ Integer(ENV_JAVA['sun.arch.data.model'])
66
+ else
67
+ 1.size == 4 ? 32 : 64
68
+ end
84
69
  end
85
70
 
86
71
  def jruby?
@@ -91,12 +76,8 @@ module Selenium
91
76
  engine == :ironruby
92
77
  end
93
78
 
94
- def ruby187?
95
- !!(RUBY_VERSION =~ /^1\.8\.7/)
96
- end
97
-
98
- def ruby19?
99
- !!(RUBY_VERSION =~ /^1\.9/)
79
+ def ruby_version
80
+ RUBY_VERSION
100
81
  end
101
82
 
102
83
  def windows?
@@ -112,26 +93,25 @@ module Selenium
112
93
  end
113
94
 
114
95
  def cygwin?
115
- !!(RUBY_PLATFORM =~ /cygwin/)
96
+ RUBY_PLATFORM =~ /cygwin/
97
+ !Regexp.last_match.nil?
116
98
  end
117
99
 
118
100
  def null_device
119
- @null_device ||= (
120
- if defined?(File::NULL)
121
- File::NULL
122
- else
123
- Platform.windows? ? 'NUL' : '/dev/null'
124
- end
125
- )
101
+ @null_device ||= if defined?(File::NULL)
102
+ File::NULL
103
+ else
104
+ Platform.windows? ? 'NUL' : '/dev/null'
105
+ end
126
106
  end
127
107
 
128
108
  def wrap_in_quotes_if_necessary(str)
129
- windows? && !cygwin? ? %{"#{str}"} : str
109
+ windows? && !cygwin? ? %("#{str}") : str
130
110
  end
131
111
 
132
112
  def cygwin_path(path, opts = {})
133
113
  flags = []
134
- opts.each { |k,v| flags << "--#{k}" if v }
114
+ opts.each { |k, v| flags << "--#{k}" if v }
135
115
 
136
116
  `cygpath #{flags.join ' '} "#{path}"`.strip
137
117
  end
@@ -141,25 +121,21 @@ module Selenium
141
121
  end
142
122
 
143
123
  def assert_file(path)
144
- unless File.file? path
145
- raise Error::WebDriverError, "not a file: #{path.inspect}"
146
- end
124
+ return if File.file? path
125
+ raise Error::WebDriverError, "not a file: #{path.inspect}"
147
126
  end
148
127
 
149
128
  def assert_executable(path)
150
129
  assert_file(path)
151
130
 
152
- unless File.executable? path
153
- raise Error::WebDriverError, "not executable: #{path.inspect}"
154
- end
131
+ return if File.executable? path
132
+ raise Error::WebDriverError, "not executable: #{path.inspect}"
155
133
  end
156
134
 
157
- def exit_hook(&blk)
135
+ def exit_hook
158
136
  pid = Process.pid
159
137
 
160
- at_exit do
161
- yield if Process.pid == pid
162
- end
138
+ at_exit { yield if Process.pid == pid }
163
139
  end
164
140
 
165
141
  def find_binary(*binary_names)
@@ -181,8 +157,8 @@ module Selenium
181
157
 
182
158
  def find_in_program_files(*binary_names)
183
159
  paths = [
184
- ENV['PROGRAMFILES'] || "\\Program Files",
185
- ENV['ProgramFiles(x86)'] || "\\Program Files (x86)"
160
+ ENV['PROGRAMFILES'] || '\\Program Files',
161
+ ENV['ProgramFiles(x86)'] || '\\Program Files (x86)'
186
162
  ]
187
163
 
188
164
  paths.each do |root|
@@ -196,13 +172,10 @@ module Selenium
196
172
  end
197
173
 
198
174
  def localhost
199
- info = Socket.getaddrinfo "localhost", 80, Socket::AF_INET, Socket::SOCK_STREAM
175
+ info = Socket.getaddrinfo 'localhost', 80, Socket::AF_INET, Socket::SOCK_STREAM
200
176
 
201
- if info.empty?
202
- raise Error::WebDriverError, "unable to translate 'localhost' for TCP + IPv4"
203
- end
204
-
205
- info[0][3]
177
+ return info[0][3] unless info.empty?
178
+ raise Error::WebDriverError, "unable to translate 'localhost' for TCP + IPv4"
206
179
  end
207
180
 
208
181
  def ip
@@ -222,27 +195,25 @@ module Selenium
222
195
  end
223
196
 
224
197
  def interfaces
225
- interfaces = Socket.getaddrinfo("localhost", 8080).map { |e| e[3] }
226
- interfaces += ["0.0.0.0", Platform.ip]
198
+ interfaces = Socket.getaddrinfo('localhost', 8080).map { |e| e[3] }
199
+ interfaces += ['0.0.0.0', Platform.ip]
227
200
 
228
201
  interfaces.compact.uniq
229
202
  end
230
-
231
203
  end # Platform
232
204
  end # WebDriver
233
205
  end # Selenium
234
206
 
235
- if __FILE__ == $0
236
- p :engine => Selenium::WebDriver::Platform.engine,
237
- :os => Selenium::WebDriver::Platform.os,
238
- :ruby187? => Selenium::WebDriver::Platform.ruby187?,
239
- :ruby19? => Selenium::WebDriver::Platform.ruby19?,
240
- :jruby? => Selenium::WebDriver::Platform.jruby?,
241
- :windows? => Selenium::WebDriver::Platform.windows?,
242
- :home => Selenium::WebDriver::Platform.home,
243
- :bitsize => Selenium::WebDriver::Platform.bitsize,
244
- :localhost => Selenium::WebDriver::Platform.localhost,
245
- :ip => Selenium::WebDriver::Platform.ip,
246
- :interfaces => Selenium::WebDriver::Platform.interfaces,
247
- :null_device => Selenium::WebDriver::Platform.null_device
207
+ if __FILE__ == $PROGRAM_NAME
208
+ p engine: Selenium::WebDriver::Platform.engine,
209
+ os: Selenium::WebDriver::Platform.os,
210
+ ruby_version: Selenium::WebDriver::Platform.ruby_version,
211
+ jruby?: Selenium::WebDriver::Platform.jruby?,
212
+ windows?: Selenium::WebDriver::Platform.windows?,
213
+ home: Selenium::WebDriver::Platform.home,
214
+ bitsize: Selenium::WebDriver::Platform.bitsize,
215
+ localhost: Selenium::WebDriver::Platform.localhost,
216
+ ip: Selenium::WebDriver::Platform.ip,
217
+ interfaces: Selenium::WebDriver::Platform.interfaces,
218
+ null_device: Selenium::WebDriver::Platform.null_device
248
219
  end