selenium-webdriver 0.1.2 → 0.1.3.dev

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. data/CHANGES +18 -1
  2. data/lib/selenium/client/legacy_driver.rb +9 -0
  3. data/lib/selenium/webdriver/android/bridge.rb +1 -1
  4. data/lib/selenium/webdriver/chrome/bridge.rb +0 -4
  5. data/lib/selenium/webdriver/chrome/command_executor.rb +2 -2
  6. data/lib/selenium/webdriver/chrome/extension.zip +0 -0
  7. data/lib/selenium/webdriver/common.rb +3 -0
  8. data/lib/selenium/webdriver/common/driver_extensions/has_input_devices.rb +22 -0
  9. data/lib/selenium/webdriver/common/element.rb +10 -0
  10. data/lib/selenium/webdriver/common/keyboard.rb +48 -0
  11. data/lib/selenium/webdriver/common/mouse.rb +63 -0
  12. data/lib/selenium/webdriver/common/platform.rb +26 -11
  13. data/lib/selenium/webdriver/common/proxy.rb +1 -1
  14. data/lib/selenium/webdriver/common/zipper.rb +0 -1
  15. data/lib/selenium/webdriver/firefox/bridge.rb +8 -8
  16. data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
  17. data/lib/selenium/webdriver/firefox/launcher.rb +1 -1
  18. data/lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so +0 -0
  19. data/lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so +0 -0
  20. data/lib/selenium/webdriver/firefox/profile.rb +9 -5
  21. data/lib/selenium/webdriver/firefox/socket_lock.rb +1 -11
  22. data/lib/selenium/webdriver/ie.rb +3 -1
  23. data/lib/selenium/webdriver/ie/bridge.rb +23 -12
  24. data/lib/selenium/webdriver/ie/native/win32/IEDriver.dll +0 -0
  25. data/lib/selenium/webdriver/ie/native/x64/IEDriver.dll +0 -0
  26. data/lib/selenium/webdriver/ie/server.rb +64 -0
  27. data/lib/selenium/webdriver/iphone/bridge.rb +1 -1
  28. data/lib/selenium/webdriver/remote/bridge.rb +62 -8
  29. data/lib/selenium/webdriver/remote/capabilities.rb +10 -3
  30. data/lib/selenium/webdriver/remote/commands.rb +67 -59
  31. data/lib/selenium/webdriver/remote/http/common.rb +4 -0
  32. data/lib/selenium/webdriver/remote/http/default.rb +10 -4
  33. data/lib/selenium/webdriver/remote/http/persistent.rb +34 -0
  34. metadata +169 -196
  35. data/lib/selenium/webdriver/ie/lib.rb +0 -26
@@ -16,6 +16,10 @@ module Selenium
16
16
  attr_accessor :timeout
17
17
  attr_writer :server_url
18
18
 
19
+ def initialize
20
+ @timeout = nil
21
+ end
22
+
19
23
  def call(verb, url, command_hash)
20
24
  url = server_url.merge(url) unless url.kind_of?(URI)
21
25
  headers = DEFAULT_HEADERS.dup
@@ -29,16 +29,16 @@ module Selenium
29
29
  end
30
30
 
31
31
  def request(verb, url, headers, payload, redirects = 0)
32
- request = new_request_for(verb, url, headers)
32
+ request = new_request_for(verb, url, headers, payload)
33
33
 
34
34
  retried = false
35
35
  begin
36
- response = http.request(request, payload)
36
+ response = response_for(request)
37
37
  rescue Errno::ECONNABORTED, Errno::ECONNRESET
38
38
  # this happens sometimes on windows?!
39
39
  raise if retried
40
40
 
41
- request = new_request_for(verb, url, headers)
41
+ request = new_request_for(verb, url, headers, payload)
42
42
  retried = true
43
43
 
44
44
  retry
@@ -52,16 +52,22 @@ module Selenium
52
52
  end
53
53
  end
54
54
 
55
- def new_request_for(verb, url, headers)
55
+ def new_request_for(verb, url, headers, payload)
56
56
  req = Net::HTTP.const_get(verb.to_s.capitalize).new(url.path, headers)
57
57
 
58
58
  if server_url.userinfo
59
59
  req.basic_auth server_url.user, server_url.password
60
60
  end
61
61
 
62
+ req.body = payload if payload
63
+
62
64
  req
63
65
  end
64
66
 
67
+ def response_for(request)
68
+ http.request request
69
+ end
70
+
65
71
  def new_http_client
66
72
  if @proxy
67
73
  unless @proxy.respond_to?(:http) && url = @proxy.http
@@ -0,0 +1,34 @@
1
+ require "net/http/persistent"
2
+
3
+ module Selenium
4
+ module WebDriver
5
+ module Remote
6
+ module Http
7
+
8
+ # @api private
9
+ class Persistent < Default
10
+
11
+ private
12
+
13
+ def new_http_client
14
+ proxy = nil
15
+
16
+ if @proxy
17
+ unless @proxy.respond_to?(:http) && url = @proxy.http
18
+ raise Error::WebDriverError, "expected HTTP proxy, got #{@proxy.inspect}"
19
+ end
20
+ proxy = URI.parse(url)
21
+ end
22
+
23
+ Net::HTTP::Persistent.new "webdriver", proxy
24
+ end
25
+
26
+ def response_for(request)
27
+ http.request server_url, request
28
+ end
29
+
30
+ end # Persistent
31
+ end # Http
32
+ end # Remote
33
+ end # WebDriver
34
+ end # Selenium
metadata CHANGED
@@ -1,122 +1,95 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 2
9
- version: 0.1.2
4
+ prerelease: 6
5
+ version: 0.1.3.dev
10
6
  platform: ruby
11
7
  authors:
12
- - Jari Bakken
8
+ - Jari Bakken
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2010-12-22 00:00:00 +01:00
13
+ date: 2011-02-04 00:00:00 +01:00
18
14
  default_executable:
19
15
  dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: json_pure
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- version: "0"
31
- type: :runtime
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: rubyzip
35
- prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
37
- none: false
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- version: "0"
44
- type: :runtime
45
- version_requirements: *id002
46
- - !ruby/object:Gem::Dependency
47
- name: childprocess
48
- prerelease: false
49
- requirement: &id003 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- - 1
57
- - 5
58
- version: 0.1.5
59
- type: :runtime
60
- version_requirements: *id003
61
- - !ruby/object:Gem::Dependency
62
- name: ffi
63
- prerelease: false
64
- requirement: &id004 !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 0
71
- - 6
72
- - 3
73
- version: 0.6.3
74
- type: :runtime
75
- version_requirements: *id004
76
- - !ruby/object:Gem::Dependency
77
- name: rspec
78
- prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
80
- none: false
81
- requirements:
82
- - - "="
83
- - !ruby/object:Gem::Version
84
- segments:
85
- - 1
86
- - 3
87
- - 0
88
- version: 1.3.0
89
- type: :development
90
- version_requirements: *id005
91
- - !ruby/object:Gem::Dependency
92
- name: rack
93
- prerelease: false
94
- requirement: &id006 !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
97
- - - ~>
98
- - !ruby/object:Gem::Version
99
- segments:
100
- - 1
101
- - 0
102
- version: "1.0"
103
- type: :development
104
- version_requirements: *id006
105
- - !ruby/object:Gem::Dependency
106
- name: ci_reporter
107
- prerelease: false
108
- requirement: &id007 !ruby/object:Gem::Requirement
109
- none: false
110
- requirements:
111
- - - ~>
112
- - !ruby/object:Gem::Version
113
- segments:
114
- - 1
115
- - 6
116
- - 2
117
- version: 1.6.2
118
- type: :development
119
- version_requirements: *id007
16
+ - !ruby/object:Gem::Dependency
17
+ name: json_pure
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubyzip
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ type: :runtime
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: childprocess
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 0.1.5
47
+ type: :runtime
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: ffi
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ version: 0.6.3
58
+ type: :runtime
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: rspec
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: "2.0"
69
+ type: :development
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: rack
73
+ prerelease: false
74
+ requirement: &id006 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ version: "1.0"
80
+ type: :development
81
+ version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
83
+ name: ci_reporter
84
+ prerelease: false
85
+ requirement: &id007 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ version: 1.6.2
91
+ type: :development
92
+ version_requirements: *id007
120
93
  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.
121
94
  email: jari.bakken@gmail.com
122
95
  executables: []
@@ -126,82 +99,86 @@ extensions: []
126
99
  extra_rdoc_files: []
127
100
 
128
101
  files:
129
- - lib/selenium-client.rb
130
- - lib/selenium-webdriver.rb
131
- - lib/selenium/client.rb
132
- - lib/selenium/server.rb
133
- - lib/selenium/webdriver.rb
134
- - lib/selenium/client/base.rb
135
- - lib/selenium/client/driver.rb
136
- - lib/selenium/client/errors.rb
137
- - lib/selenium/client/extensions.rb
138
- - lib/selenium/client/idiomatic.rb
139
- - lib/selenium/client/javascript_expression_builder.rb
140
- - lib/selenium/client/legacy_driver.rb
141
- - lib/selenium/client/protocol.rb
142
- - lib/selenium/client/selenium_helper.rb
143
- - lib/selenium/client/javascript_frameworks/jquery.rb
144
- - lib/selenium/client/javascript_frameworks/prototype.rb
145
- - lib/selenium/rake/server_task.rb
146
- - lib/selenium/webdriver/android.rb
147
- - lib/selenium/webdriver/chrome.rb
148
- - lib/selenium/webdriver/common.rb
149
- - lib/selenium/webdriver/firefox.rb
150
- - lib/selenium/webdriver/ie.rb
151
- - lib/selenium/webdriver/iphone.rb
152
- - lib/selenium/webdriver/remote.rb
153
- - lib/selenium/webdriver/android/bridge.rb
154
- - lib/selenium/webdriver/chrome/bridge.rb
155
- - lib/selenium/webdriver/chrome/command_executor.rb
156
- - lib/selenium/webdriver/chrome/extension.zip
157
- - lib/selenium/webdriver/chrome/launcher.rb
158
- - lib/selenium/webdriver/common/alert.rb
159
- - lib/selenium/webdriver/common/bridge_helper.rb
160
- - lib/selenium/webdriver/common/driver.rb
161
- - lib/selenium/webdriver/common/element.rb
162
- - lib/selenium/webdriver/common/error.rb
163
- - lib/selenium/webdriver/common/file_reaper.rb
164
- - lib/selenium/webdriver/common/find.rb
165
- - lib/selenium/webdriver/common/keys.rb
166
- - lib/selenium/webdriver/common/navigation.rb
167
- - lib/selenium/webdriver/common/options.rb
168
- - lib/selenium/webdriver/common/platform.rb
169
- - lib/selenium/webdriver/common/proxy.rb
170
- - lib/selenium/webdriver/common/socket_poller.rb
171
- - lib/selenium/webdriver/common/target_locator.rb
172
- - lib/selenium/webdriver/common/timeouts.rb
173
- - lib/selenium/webdriver/common/wait.rb
174
- - lib/selenium/webdriver/common/zipper.rb
175
- - lib/selenium/webdriver/common/core_ext/dir.rb
176
- - lib/selenium/webdriver/common/core_ext/string.rb
177
- - lib/selenium/webdriver/common/driver_extensions/rotatable.rb
178
- - lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb
179
- - lib/selenium/webdriver/firefox/binary.rb
180
- - lib/selenium/webdriver/firefox/bridge.rb
181
- - lib/selenium/webdriver/firefox/extension.rb
182
- - lib/selenium/webdriver/firefox/launcher.rb
183
- - lib/selenium/webdriver/firefox/profile.rb
184
- - lib/selenium/webdriver/firefox/profiles_ini.rb
185
- - lib/selenium/webdriver/firefox/socket_lock.rb
186
- - lib/selenium/webdriver/firefox/util.rb
187
- - lib/selenium/webdriver/firefox/extension/webdriver.xpi
188
- - lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so
189
- - lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so
190
- - lib/selenium/webdriver/ie/bridge.rb
191
- - lib/selenium/webdriver/ie/lib.rb
192
- - lib/selenium/webdriver/ie/native/win32/IEDriver.dll
193
- - lib/selenium/webdriver/ie/native/x64/IEDriver.dll
194
- - lib/selenium/webdriver/iphone/bridge.rb
195
- - lib/selenium/webdriver/remote/bridge.rb
196
- - lib/selenium/webdriver/remote/capabilities.rb
197
- - lib/selenium/webdriver/remote/commands.rb
198
- - lib/selenium/webdriver/remote/response.rb
199
- - lib/selenium/webdriver/remote/server_error.rb
200
- - lib/selenium/webdriver/remote/http/common.rb
201
- - lib/selenium/webdriver/remote/http/curb.rb
202
- - lib/selenium/webdriver/remote/http/default.rb
203
- - CHANGES
204
- - README
102
+ - lib/selenium/client/base.rb
103
+ - lib/selenium/client/driver.rb
104
+ - lib/selenium/client/errors.rb
105
+ - lib/selenium/client/extensions.rb
106
+ - lib/selenium/client/idiomatic.rb
107
+ - lib/selenium/client/javascript_expression_builder.rb
108
+ - lib/selenium/client/javascript_frameworks/jquery.rb
109
+ - lib/selenium/client/javascript_frameworks/prototype.rb
110
+ - lib/selenium/client/legacy_driver.rb
111
+ - lib/selenium/client/protocol.rb
112
+ - lib/selenium/client/selenium_helper.rb
113
+ - lib/selenium/client.rb
114
+ - lib/selenium/rake/server_task.rb
115
+ - lib/selenium/server.rb
116
+ - lib/selenium/webdriver/android/bridge.rb
117
+ - lib/selenium/webdriver/android.rb
118
+ - lib/selenium/webdriver/chrome/bridge.rb
119
+ - lib/selenium/webdriver/chrome/command_executor.rb
120
+ - lib/selenium/webdriver/chrome/extension.zip
121
+ - lib/selenium/webdriver/chrome/launcher.rb
122
+ - lib/selenium/webdriver/chrome.rb
123
+ - lib/selenium/webdriver/common/alert.rb
124
+ - lib/selenium/webdriver/common/bridge_helper.rb
125
+ - lib/selenium/webdriver/common/core_ext/dir.rb
126
+ - lib/selenium/webdriver/common/core_ext/string.rb
127
+ - lib/selenium/webdriver/common/driver.rb
128
+ - lib/selenium/webdriver/common/driver_extensions/has_input_devices.rb
129
+ - lib/selenium/webdriver/common/driver_extensions/rotatable.rb
130
+ - lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb
131
+ - lib/selenium/webdriver/common/element.rb
132
+ - lib/selenium/webdriver/common/error.rb
133
+ - lib/selenium/webdriver/common/file_reaper.rb
134
+ - lib/selenium/webdriver/common/find.rb
135
+ - lib/selenium/webdriver/common/keyboard.rb
136
+ - lib/selenium/webdriver/common/keys.rb
137
+ - lib/selenium/webdriver/common/mouse.rb
138
+ - lib/selenium/webdriver/common/navigation.rb
139
+ - lib/selenium/webdriver/common/options.rb
140
+ - lib/selenium/webdriver/common/platform.rb
141
+ - lib/selenium/webdriver/common/proxy.rb
142
+ - lib/selenium/webdriver/common/socket_poller.rb
143
+ - lib/selenium/webdriver/common/target_locator.rb
144
+ - lib/selenium/webdriver/common/timeouts.rb
145
+ - lib/selenium/webdriver/common/wait.rb
146
+ - lib/selenium/webdriver/common/zipper.rb
147
+ - lib/selenium/webdriver/common.rb
148
+ - lib/selenium/webdriver/firefox/binary.rb
149
+ - lib/selenium/webdriver/firefox/bridge.rb
150
+ - lib/selenium/webdriver/firefox/extension/webdriver.xpi
151
+ - lib/selenium/webdriver/firefox/extension.rb
152
+ - lib/selenium/webdriver/firefox/launcher.rb
153
+ - lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so
154
+ - lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so
155
+ - lib/selenium/webdriver/firefox/profile.rb
156
+ - lib/selenium/webdriver/firefox/profiles_ini.rb
157
+ - lib/selenium/webdriver/firefox/socket_lock.rb
158
+ - lib/selenium/webdriver/firefox/util.rb
159
+ - lib/selenium/webdriver/firefox.rb
160
+ - lib/selenium/webdriver/ie/bridge.rb
161
+ - lib/selenium/webdriver/ie/native/win32/IEDriver.dll
162
+ - lib/selenium/webdriver/ie/native/x64/IEDriver.dll
163
+ - lib/selenium/webdriver/ie/server.rb
164
+ - lib/selenium/webdriver/ie.rb
165
+ - lib/selenium/webdriver/iphone/bridge.rb
166
+ - lib/selenium/webdriver/iphone.rb
167
+ - lib/selenium/webdriver/remote/bridge.rb
168
+ - lib/selenium/webdriver/remote/capabilities.rb
169
+ - lib/selenium/webdriver/remote/commands.rb
170
+ - lib/selenium/webdriver/remote/http/common.rb
171
+ - lib/selenium/webdriver/remote/http/curb.rb
172
+ - lib/selenium/webdriver/remote/http/default.rb
173
+ - lib/selenium/webdriver/remote/http/persistent.rb
174
+ - lib/selenium/webdriver/remote/response.rb
175
+ - lib/selenium/webdriver/remote/server_error.rb
176
+ - lib/selenium/webdriver/remote.rb
177
+ - lib/selenium/webdriver.rb
178
+ - lib/selenium-client.rb
179
+ - lib/selenium-webdriver.rb
180
+ - CHANGES
181
+ - README
205
182
  has_rdoc: true
206
183
  homepage: http://selenium.googlecode.com
207
184
  licenses: []
@@ -210,27 +187,23 @@ post_install_message:
210
187
  rdoc_options: []
211
188
 
212
189
  require_paths:
213
- - lib
190
+ - lib
214
191
  required_ruby_version: !ruby/object:Gem::Requirement
215
192
  none: false
216
193
  requirements:
217
- - - ">="
218
- - !ruby/object:Gem::Version
219
- segments:
220
- - 0
221
- version: "0"
194
+ - - ">="
195
+ - !ruby/object:Gem::Version
196
+ version: "0"
222
197
  required_rubygems_version: !ruby/object:Gem::Requirement
223
198
  none: false
224
199
  requirements:
225
- - - ">="
226
- - !ruby/object:Gem::Version
227
- segments:
228
- - 0
229
- version: "0"
200
+ - - ">"
201
+ - !ruby/object:Gem::Version
202
+ version: 1.3.1
230
203
  requirements: []
231
204
 
232
205
  rubyforge_project:
233
- rubygems_version: 1.3.7
206
+ rubygems_version: 1.5.0
234
207
  signing_key:
235
208
  specification_version: 3
236
209
  summary: The next generation developer focused tool for automated testing of webapps