selenium-webdriver 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/chrome/prebuilt/Win32/Release/npchromedriver.dll +0 -0
- data/chrome/prebuilt/x64/Release/npchromedriver.dll +0 -0
- data/chrome/src/extension/background.js +64 -48
- data/chrome/src/extension/content_script.js +253 -132
- data/chrome/src/extension/manifest-nonwin.json +1 -1
- data/chrome/src/extension/manifest-win.json +1 -1
- data/chrome/src/extension/utils.js +8 -8
- data/chrome/src/rb/lib/selenium/webdriver/chrome.rb +9 -0
- data/chrome/src/rb/lib/selenium/webdriver/chrome/bridge.rb +38 -280
- data/chrome/src/rb/lib/selenium/webdriver/chrome/command_executor.rb +119 -117
- data/chrome/src/rb/lib/selenium/webdriver/chrome/launcher.rb +36 -26
- data/common/src/js/abstractcommandprocessor.js +9 -11
- data/common/src/js/command.js +159 -83
- data/common/src/js/core/RemoteRunner.html +2 -2
- data/common/src/js/core/TestRunner-splash.html +3 -3
- data/common/src/js/core/TestRunner.html +5 -17
- data/common/src/js/core/scripts/htmlutils.js +4208 -2506
- data/common/src/js/core/scripts/selenium-api.js +2 -2
- data/common/src/js/core/scripts/selenium-browserbot.js +66 -58
- data/common/src/js/core/scripts/selenium-version.js +1 -1
- data/common/src/js/localcommandprocessor.js +5 -19
- data/common/src/js/testcase.js +2 -0
- data/common/src/js/webdriver.js +63 -93
- data/common/src/js/webelement.js +40 -42
- data/common/src/rb/lib/selenium/webdriver.rb +23 -14
- data/common/src/rb/lib/selenium/webdriver/bridge_helper.rb +8 -35
- data/common/src/rb/lib/selenium/webdriver/child_process.rb +2 -0
- data/common/src/rb/lib/selenium/webdriver/core_ext/dir.rb +1 -0
- data/common/src/rb/lib/selenium/webdriver/core_ext/string.rb +5 -0
- data/common/src/rb/lib/selenium/webdriver/driver.rb +20 -15
- data/common/src/rb/lib/selenium/webdriver/driver_extensions/takes_screenshot.rb +7 -2
- data/common/src/rb/lib/selenium/webdriver/element.rb +11 -2
- data/common/src/rb/lib/selenium/webdriver/error.rb +9 -5
- data/common/src/rb/lib/selenium/webdriver/keys.rb +1 -2
- data/common/src/rb/lib/selenium/webdriver/navigation.rb +16 -0
- data/common/src/rb/lib/selenium/webdriver/options.rb +32 -0
- data/common/src/rb/lib/selenium/webdriver/platform.rb +17 -1
- data/firefox/prebuilt/Win32/Release/webdriver-firefox.dll +0 -0
- data/firefox/src/extension/components/dispatcher.js +492 -0
- data/firefox/src/extension/components/driver-component.js +4 -1
- data/firefox/src/extension/components/errorcode.js +70 -0
- data/firefox/src/extension/components/firefoxDriver.js +173 -154
- data/firefox/src/extension/components/nsCommandProcessor.js +171 -132
- data/firefox/src/extension/components/promptService.js +5 -5
- data/firefox/src/extension/components/request.js +219 -0
- data/firefox/src/extension/components/response.js +276 -0
- data/firefox/src/extension/components/session.js +281 -0
- data/firefox/src/extension/components/sessionstore.js +226 -0
- data/firefox/src/extension/components/socketListener.js +350 -100
- data/firefox/src/extension/components/utils.js +166 -98
- data/firefox/src/extension/components/webdriverserver.js +9 -5
- data/firefox/src/extension/components/wrappedElement.js +189 -166
- data/firefox/src/extension/install.rdf +1 -1
- data/firefox/src/rb/lib/selenium/webdriver/firefox.rb +2 -0
- data/firefox/src/rb/lib/selenium/webdriver/firefox/binary.rb +39 -33
- data/firefox/src/rb/lib/selenium/webdriver/firefox/bridge.rb +7 -421
- data/firefox/src/rb/lib/selenium/webdriver/firefox/extension_connection.rb +7 -64
- data/firefox/src/rb/lib/selenium/webdriver/firefox/launcher.rb +2 -3
- data/firefox/src/rb/lib/selenium/webdriver/firefox/profile.rb +54 -10
- data/firefox/src/rb/lib/selenium/webdriver/firefox/profiles_ini.rb +2 -0
- data/firefox/src/rb/lib/selenium/webdriver/firefox/util.rb +6 -0
- data/jobbie/prebuilt/Win32/Release/InternetExplorerDriver.dll +0 -0
- data/jobbie/prebuilt/x64/Release/InternetExplorerDriver.dll +0 -0
- data/jobbie/src/rb/lib/selenium/webdriver/ie.rb +2 -0
- data/jobbie/src/rb/lib/selenium/webdriver/ie/bridge.rb +38 -13
- data/jobbie/src/rb/lib/selenium/webdriver/ie/lib.rb +9 -2
- data/jobbie/src/rb/lib/selenium/webdriver/ie/util.rb +5 -0
- data/remote/client/src/rb/lib/selenium/webdriver/remote.rb +2 -0
- data/remote/client/src/rb/lib/selenium/webdriver/remote/bridge.rb +42 -38
- data/remote/client/src/rb/lib/selenium/webdriver/remote/commands.rb +56 -47
- data/remote/client/src/rb/lib/selenium/webdriver/remote/default_http_client.rb +26 -26
- data/remote/client/src/rb/lib/selenium/webdriver/remote/patron_http_client.rb +58 -0
- data/remote/client/src/rb/lib/selenium/webdriver/remote/response.rb +10 -12
- data/remote/client/src/rb/lib/selenium/webdriver/remote/server_error.rb +2 -17
- metadata +44 -23
- data/common/src/js/context.js +0 -58
- data/firefox/src/extension/components/context.js +0 -37
@@ -4,27 +4,12 @@ module Selenium
|
|
4
4
|
class ServerError < StandardError
|
5
5
|
|
6
6
|
def initialize(response)
|
7
|
-
|
8
|
-
|
9
|
-
if response.respond_to?(:error) && err = response.error
|
10
|
-
super(err["message"] || err['class'])
|
7
|
+
if response.kind_of? String
|
8
|
+
super(response)
|
11
9
|
else
|
12
10
|
super("status code #{response.code}")
|
13
11
|
end
|
14
12
|
end
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
REMOTE_EXCEPTIONS = {
|
19
|
-
'org.openqa.selenium.NoSuchElementException' => NoSuchElementError,
|
20
|
-
'org.openqa.selenium.NoSuchFrameException' => NoSuchFrameError,
|
21
|
-
'org.openqa.selenium.NoSuchWindowException' => NoSuchWindowError,
|
22
|
-
}
|
23
|
-
|
24
|
-
class << self
|
25
|
-
def for_remote_class(klass)
|
26
|
-
REMOTE_EXCEPTIONS[klass] || ServerError
|
27
|
-
end
|
28
13
|
end
|
29
14
|
|
30
15
|
end # Error
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium-webdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 18
|
9
|
+
version: 0.0.18
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Jari Bakken
|
@@ -9,49 +14,57 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-04-21 00:00:00 +02:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: json_pure
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
23
29
|
version: "0"
|
24
|
-
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
25
32
|
- !ruby/object:Gem::Dependency
|
26
33
|
name: ffi
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
34
|
+
prerelease: false
|
35
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
39
|
+
segments:
|
40
|
+
- 0
|
33
41
|
version: "0"
|
34
|
-
|
42
|
+
type: :runtime
|
43
|
+
version_requirements: *id002
|
35
44
|
- !ruby/object:Gem::Dependency
|
36
45
|
name: rspec
|
37
|
-
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
prerelease: false
|
47
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
48
|
requirements:
|
41
49
|
- - ">="
|
42
50
|
- !ruby/object:Gem::Version
|
51
|
+
segments:
|
52
|
+
- 0
|
43
53
|
version: "0"
|
44
|
-
|
54
|
+
type: :development
|
55
|
+
version_requirements: *id003
|
45
56
|
- !ruby/object:Gem::Dependency
|
46
57
|
name: rack
|
47
|
-
|
48
|
-
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
prerelease: false
|
59
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
60
|
requirements:
|
51
61
|
- - ">="
|
52
62
|
- !ruby/object:Gem::Version
|
63
|
+
segments:
|
64
|
+
- 0
|
53
65
|
version: "0"
|
54
|
-
|
66
|
+
type: :development
|
67
|
+
version_requirements: *id004
|
55
68
|
description: WebDriver is a tool for writing automated tests of websites. It aims to mimic the behaviour of a real user, and as such interacts with the HTML of the application.
|
56
69
|
email: jari.bakken@gmail.com
|
57
70
|
executables: []
|
@@ -65,6 +78,7 @@ files:
|
|
65
78
|
- common/src/rb/lib/selenium/webdriver/bridge_helper.rb
|
66
79
|
- common/src/rb/lib/selenium/webdriver/child_process.rb
|
67
80
|
- common/src/rb/lib/selenium/webdriver/core_ext/dir.rb
|
81
|
+
- common/src/rb/lib/selenium/webdriver/core_ext/string.rb
|
68
82
|
- common/src/rb/lib/selenium/webdriver/driver.rb
|
69
83
|
- common/src/rb/lib/selenium/webdriver/driver_extensions/takes_screenshot.rb
|
70
84
|
- common/src/rb/lib/selenium/webdriver/element.rb
|
@@ -82,7 +96,6 @@ files:
|
|
82
96
|
- common/src/js/asserts.js
|
83
97
|
- common/src/js/by.js
|
84
98
|
- common/src/js/command.js
|
85
|
-
- common/src/js/context.js
|
86
99
|
- common/src/js/core/Blank.html
|
87
100
|
- common/src/js/core/icons/all.png
|
88
101
|
- common/src/js/core/icons/continue.png
|
@@ -199,14 +212,19 @@ files:
|
|
199
212
|
- firefox/src/rb/lib/selenium/webdriver/firefox.rb
|
200
213
|
- firefox/src/extension/chrome.manifest
|
201
214
|
- firefox/src/extension/components/badCertListener.js
|
202
|
-
- firefox/src/extension/components/
|
215
|
+
- firefox/src/extension/components/dispatcher.js
|
203
216
|
- firefox/src/extension/components/driver-component.js
|
217
|
+
- firefox/src/extension/components/errorcode.js
|
204
218
|
- firefox/src/extension/components/firefoxDriver.js
|
205
219
|
- firefox/src/extension/components/json2.js
|
206
220
|
- firefox/src/extension/components/keytest.html
|
207
221
|
- firefox/src/extension/components/nsCommandProcessor.js
|
208
222
|
- firefox/src/extension/components/promptService.js
|
223
|
+
- firefox/src/extension/components/request.js
|
224
|
+
- firefox/src/extension/components/response.js
|
209
225
|
- firefox/src/extension/components/screenshooter.js
|
226
|
+
- firefox/src/extension/components/session.js
|
227
|
+
- firefox/src/extension/components/sessionstore.js
|
210
228
|
- firefox/src/extension/components/socketListener.js
|
211
229
|
- firefox/src/extension/components/utils.js
|
212
230
|
- firefox/src/extension/components/webdriverserver.js
|
@@ -249,6 +267,7 @@ files:
|
|
249
267
|
- remote/client/src/rb/lib/selenium/webdriver/remote/capabilities.rb
|
250
268
|
- remote/client/src/rb/lib/selenium/webdriver/remote/commands.rb
|
251
269
|
- remote/client/src/rb/lib/selenium/webdriver/remote/default_http_client.rb
|
270
|
+
- remote/client/src/rb/lib/selenium/webdriver/remote/patron_http_client.rb
|
252
271
|
- remote/client/src/rb/lib/selenium/webdriver/remote/response.rb
|
253
272
|
- remote/client/src/rb/lib/selenium/webdriver/remote/server_error.rb
|
254
273
|
- remote/client/src/rb/lib/selenium/webdriver/remote.rb
|
@@ -269,18 +288,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
269
288
|
requirements:
|
270
289
|
- - ">="
|
271
290
|
- !ruby/object:Gem::Version
|
291
|
+
segments:
|
292
|
+
- 0
|
272
293
|
version: "0"
|
273
|
-
version:
|
274
294
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
275
295
|
requirements:
|
276
296
|
- - ">="
|
277
297
|
- !ruby/object:Gem::Version
|
298
|
+
segments:
|
299
|
+
- 0
|
278
300
|
version: "0"
|
279
|
-
version:
|
280
301
|
requirements: []
|
281
302
|
|
282
303
|
rubyforge_project:
|
283
|
-
rubygems_version: 1.3.
|
304
|
+
rubygems_version: 1.3.6
|
284
305
|
signing_key:
|
285
306
|
specification_version: 3
|
286
307
|
summary: The next generation developer focused tool for automated testing of webapps
|
data/common/src/js/context.js
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
/** @license
|
2
|
-
Copyright 2007-2009 WebDriver committers
|
3
|
-
Copyright 2007-2009 Google Inc.
|
4
|
-
|
5
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
you may not use this file except in compliance with the License.
|
7
|
-
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, software
|
12
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
See the License for the specific language governing permissions and
|
15
|
-
limitations under the License.
|
16
|
-
*/
|
17
|
-
|
18
|
-
/**
|
19
|
-
* @fileoverview Defines a simple class for tracking the context of a WebDriver
|
20
|
-
* instance currently being controlled.
|
21
|
-
* @author jmleyba@gmail.com (Jason Leyba)
|
22
|
-
*/
|
23
|
-
|
24
|
-
goog.provide('webdriver.Context');
|
25
|
-
|
26
|
-
|
27
|
-
/**
|
28
|
-
* Keeps track of a WebDriver context (window and frame).
|
29
|
-
* @param {string} opt_windowId The current window ID.
|
30
|
-
* @param {string} opt_frameId The current frame ID.
|
31
|
-
* @constructor
|
32
|
-
*/
|
33
|
-
webdriver.Context = function(opt_windowId, opt_frameId) {
|
34
|
-
this.windowId = opt_windowId || '';
|
35
|
-
this.frameId = opt_frameId || '';
|
36
|
-
};
|
37
|
-
|
38
|
-
|
39
|
-
/**
|
40
|
-
* @return {string} The string representation of this context, in the form of
|
41
|
-
* "${windowId} ${frameId}".
|
42
|
-
* @override
|
43
|
-
*/
|
44
|
-
webdriver.Context.prototype.toString = function() {
|
45
|
-
return this.windowId + ' ' + this.frameId;
|
46
|
-
};
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
/**
|
51
|
-
* Creates a new context from the given string.
|
52
|
-
* @param {string} str A string of the form "${windowId} ${frameId}".
|
53
|
-
* @static
|
54
|
-
*/
|
55
|
-
webdriver.Context.fromString = function(str) {
|
56
|
-
var parts = str.split(' ');
|
57
|
-
return new webdriver.Context(parts[0], parts[1]);
|
58
|
-
};
|
@@ -1,37 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright 2007-2009 WebDriver committers
|
3
|
-
Copyright 2007-2009 Google Inc.
|
4
|
-
Portions copyright 2007 ThoughtWorks, Inc
|
5
|
-
|
6
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
you may not use this file except in compliance with the License.
|
8
|
-
You may obtain a copy of the License at
|
9
|
-
|
10
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
|
12
|
-
Unless required by applicable law or agreed to in writing, software
|
13
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
See the License for the specific language governing permissions and
|
16
|
-
limitations under the License.
|
17
|
-
*/
|
18
|
-
|
19
|
-
function Context(windowId, frameId) {
|
20
|
-
this.windowId = windowId;
|
21
|
-
|
22
|
-
if (typeof frameId == 'number' || (typeof frameId == 'string' && frameId)) {
|
23
|
-
this.frameId = frameId;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
|
27
|
-
|
28
|
-
Context.fromString = function(text) {
|
29
|
-
var bits = text.split(" ");
|
30
|
-
return new Context(bits[0], bits[1]);
|
31
|
-
};
|
32
|
-
|
33
|
-
|
34
|
-
Context.prototype.toString = function() {
|
35
|
-
return this.windowId + " " +
|
36
|
-
(this.frameId !== undefined ? this.frameId.toString() : "");
|
37
|
-
};
|