selenium-webdriver 0.2.0.dev → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +17 -3
- data/lib/selenium/client.rb +14 -8
- data/lib/selenium/webdriver/chrome/service.rb +2 -0
- data/lib/selenium/webdriver/firefox/bridge.rb +1 -1
- data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
- data/lib/selenium/webdriver/firefox/profile.rb +10 -6
- data/lib/selenium/webdriver/ie/native/win32/IEDriver.dll +0 -0
- data/lib/selenium/webdriver/ie/native/x64/IEDriver.dll +0 -0
- data/lib/selenium/webdriver/remote/capabilities.rb +26 -21
- metadata +6 -8
data/CHANGES
CHANGED
@@ -1,9 +1,23 @@
|
|
1
|
-
0.2.0 (
|
1
|
+
0.2.0 (2011-04-22)
|
2
2
|
==================
|
3
3
|
|
4
|
-
* Update Ruby bindings to use the
|
5
|
-
* Add deprecation warning for WebDriver::Element#value.
|
4
|
+
* Update Ruby bindings to use the rewritten Chrome driver (see http://code.google.com/p/selenium/wiki/ChromeDriver).
|
5
|
+
* Add deprecation warning for WebDriver::Element#value (use Element#attribute("value") instead).
|
6
6
|
* Change the default timeout for Wait instances to 5 seconds.
|
7
|
+
* Fix bug where locators would fail if Object.prototype had been modified.
|
8
|
+
* Various IE fixes
|
9
|
+
- Issues: #698, #1444
|
10
|
+
- Improved handling of showModalDialog()
|
11
|
+
- Full-size screenshots
|
12
|
+
* Allow users to override the dom.max_script_run_time preference in Firefox.
|
13
|
+
* Removed DesiredCapabilities.safari, which was never supported anyway.
|
14
|
+
* Add DesiredCapabilities.opera, which will be supported in the Remote server if OperaDriver is on the classpath.
|
15
|
+
* Print warnings for deprecated constants in the RC client:
|
16
|
+
- Selenium::SeleniumDriver => Selenium::Client::Driver
|
17
|
+
- Selenium::CommandError => Selenium::Client::CommandError
|
18
|
+
* Removed top-level constants:
|
19
|
+
- SeleniumHelper (available as Selenium::Client::SeleniumHelper)
|
20
|
+
- SeleniumCommandError (available as Selenium::Client::CommandError)
|
7
21
|
|
8
22
|
0.1.4 (2011-03-21)
|
9
23
|
==================
|
data/lib/selenium/client.rb
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Helper requiring the basic selenium-client API (no RSpec goodness)
|
3
|
-
#
|
4
|
-
|
5
1
|
require 'net/http'
|
6
2
|
require 'uri'
|
7
3
|
require 'cgi'
|
@@ -23,8 +19,18 @@ require 'selenium/client/selenium_helper'
|
|
23
19
|
require 'selenium/server'
|
24
20
|
require 'selenium/rake/server_task'
|
25
21
|
|
26
|
-
|
22
|
+
module Selenium
|
23
|
+
DEPRECATED_CONSTANTS = {
|
24
|
+
:SeleniumDriver => Selenium::Client::Driver,
|
25
|
+
:CommandError => Selenium::Client::CommandError
|
26
|
+
}
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
Selenium
|
28
|
+
def self.const_missing(name)
|
29
|
+
if replacement = DEPRECATED_CONSTANTS[name.to_sym]
|
30
|
+
warn "the Selenium::#{name} constant has been deprecated, please use #{replacement} instead"
|
31
|
+
replacement
|
32
|
+
else
|
33
|
+
super
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end # Selenium
|
@@ -20,7 +20,7 @@ module Selenium
|
|
20
20
|
|
21
21
|
remote_opts = {
|
22
22
|
:url => @launcher.url,
|
23
|
-
:desired_capabilities => :
|
23
|
+
:desired_capabilities => Remote::Capabilities.firefox(:native_events => DEFAULT_ENABLE_NATIVE_EVENTS)
|
24
24
|
}
|
25
25
|
|
26
26
|
remote_opts.merge!(:http_client => http_client) if http_client
|
Binary file
|
@@ -259,9 +259,9 @@ module Selenium
|
|
259
259
|
path = File.join(directory, 'user.js')
|
260
260
|
prefs = read_user_prefs(path)
|
261
261
|
|
262
|
-
prefs.merge! OVERRIDABLE_PREFERENCES
|
263
|
-
prefs.merge! @additional_prefs
|
264
262
|
prefs.merge! DEFAULT_PREFERENCES
|
263
|
+
prefs.merge! @additional_prefs
|
264
|
+
prefs.merge! FROZEN_PREFERENCES
|
265
265
|
|
266
266
|
prefs[WEBDRIVER_PREFS[:untrusted_certs]] = !secure_ssl?
|
267
267
|
prefs[WEBDRIVER_PREFS[:native_events]] = native_events?
|
@@ -296,12 +296,17 @@ module Selenium
|
|
296
296
|
}
|
297
297
|
end
|
298
298
|
|
299
|
-
|
299
|
+
DEFAULT_PREFERENCES = {
|
300
300
|
"browser.startup.page" => '0',
|
301
|
-
"browser.startup.homepage" => '"about:blank"'
|
301
|
+
"browser.startup.homepage" => '"about:blank"',
|
302
|
+
"dom.max_script_run_time" => '30',
|
302
303
|
}.freeze
|
303
304
|
|
304
|
-
|
305
|
+
|
306
|
+
# Profile preferences that are essential to the Firefox driver operating
|
307
|
+
# correctly. Users are not permitted to override these values.
|
308
|
+
|
309
|
+
FROZEN_PREFERENCES = {
|
305
310
|
"app.update.auto" => 'false',
|
306
311
|
"app.update.enabled" => 'false',
|
307
312
|
"browser.download.manager.showWhenStarting" => 'false',
|
@@ -317,7 +322,6 @@ module Selenium
|
|
317
322
|
"browser.tabs.warnOnOpen" => 'false',
|
318
323
|
"devtools.errorconsole.enabled" => 'true',
|
319
324
|
"dom.disable_open_during_load" => 'false',
|
320
|
-
"dom.max_script_run_time" => '30',
|
321
325
|
"extensions.logging.enabled" => 'true',
|
322
326
|
"extensions.update.enabled" => 'false',
|
323
327
|
"extensions.update.notifyUser" => 'false',
|
Binary file
|
Binary file
|
@@ -30,20 +30,31 @@ module Selenium
|
|
30
30
|
#
|
31
31
|
|
32
32
|
class << self
|
33
|
-
def
|
33
|
+
def android(opts = {})
|
34
34
|
new({
|
35
|
-
:browser_name
|
36
|
-
:
|
35
|
+
:browser_name => "android",
|
36
|
+
:platform => :android,
|
37
|
+
:rotatable => true,
|
38
|
+
:takes_screenshot => true
|
37
39
|
}.merge(opts))
|
38
40
|
end
|
39
41
|
|
40
|
-
def
|
42
|
+
def chrome(opts = {})
|
41
43
|
new({
|
42
|
-
:browser_name
|
43
|
-
:
|
44
|
+
:browser_name => "chrome",
|
45
|
+
:javascript_enabled => true,
|
46
|
+
:css_selectors_enabled => true
|
47
|
+
}.merge(opts))
|
48
|
+
end
|
49
|
+
|
50
|
+
def firefox(opts = {})
|
51
|
+
new({
|
52
|
+
:browser_name => "firefox",
|
53
|
+
:javascript_enabled => true,
|
54
|
+
:takes_screenshot => true,
|
55
|
+
:css_selectors_enabled => true
|
44
56
|
}.merge(opts))
|
45
57
|
end
|
46
|
-
alias_method :ie, :internet_explorer
|
47
58
|
|
48
59
|
def htmlunit(opts = {})
|
49
60
|
new({
|
@@ -51,12 +62,15 @@ module Selenium
|
|
51
62
|
}.merge(opts))
|
52
63
|
end
|
53
64
|
|
54
|
-
def
|
65
|
+
def internet_explorer(opts = {})
|
55
66
|
new({
|
56
|
-
:browser_name
|
57
|
-
:platform
|
67
|
+
:browser_name => "internet explorer",
|
68
|
+
:platform => :windows,
|
69
|
+
:takes_screenshot => true,
|
70
|
+
:css_selectors_enabled => true
|
58
71
|
}.merge(opts))
|
59
72
|
end
|
73
|
+
alias_method :ie, :internet_explorer
|
60
74
|
|
61
75
|
def iphone(opts = {})
|
62
76
|
new({
|
@@ -66,22 +80,13 @@ module Selenium
|
|
66
80
|
}.merge(opts))
|
67
81
|
end
|
68
82
|
|
69
|
-
def
|
83
|
+
def opera(opts = {})
|
70
84
|
new({
|
71
|
-
:browser_name => "
|
85
|
+
:browser_name => "opera",
|
72
86
|
:javascript_enabled => true
|
73
87
|
}.merge(opts))
|
74
88
|
end
|
75
89
|
|
76
|
-
def android(opts = {})
|
77
|
-
new({
|
78
|
-
:browser_name => "android",
|
79
|
-
:platform => :android,
|
80
|
-
:rotatable => true,
|
81
|
-
:takes_screenshot => true
|
82
|
-
}.merge(opts))
|
83
|
-
end
|
84
|
-
|
85
90
|
#
|
86
91
|
# @api private
|
87
92
|
#
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium-webdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 0.2.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.2.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jari Bakken
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-04-22 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: json_pure
|
@@ -179,7 +178,6 @@ files:
|
|
179
178
|
- lib/selenium-webdriver.rb
|
180
179
|
- CHANGES
|
181
180
|
- README
|
182
|
-
has_rdoc: true
|
183
181
|
homepage: http://selenium.googlecode.com
|
184
182
|
licenses: []
|
185
183
|
|
@@ -197,13 +195,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
196
|
none: false
|
199
197
|
requirements:
|
200
|
-
- - "
|
198
|
+
- - ">="
|
201
199
|
- !ruby/object:Gem::Version
|
202
|
-
version:
|
200
|
+
version: "0"
|
203
201
|
requirements: []
|
204
202
|
|
205
203
|
rubyforge_project:
|
206
|
-
rubygems_version: 1.
|
204
|
+
rubygems_version: 1.7.2
|
207
205
|
signing_key:
|
208
206
|
specification_version: 3
|
209
207
|
summary: The next generation developer focused tool for automated testing of webapps
|