selenium-webdriver 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/common/src/rb/CHANGES
CHANGED
@@ -1,18 +1,25 @@
|
|
1
|
-
2010-06-11
|
2
|
-
|
1
|
+
0.0.22 (2010-06-11)
|
2
|
+
===================
|
3
|
+
|
4
|
+
* Bugfix: Workaround for http://github.com/taf2/curb/issues/issue/33 - curb would sometimes use DELETE for GET requests.
|
5
|
+
* Minor doc fix
|
6
|
+
* Add ability to set timeout for HTTP clients
|
7
|
+
|
8
|
+
0.0.21 (2010-06-11)
|
9
|
+
===================
|
3
10
|
|
4
11
|
* User can specify :http_client for the Firefox driver.
|
5
12
|
* Refactor HTTP client code
|
6
13
|
* Add Remote::Http::Curb as an alternative to the default (net/http) client.
|
7
14
|
|
8
15
|
|
9
|
-
2010-06-03
|
10
|
-
|
16
|
+
0.0.20 (2010-06-03)
|
17
|
+
===================
|
11
18
|
|
12
19
|
* Fix bug where Firefox would hang on quit().
|
13
20
|
|
14
|
-
2010-05-31
|
15
|
-
|
21
|
+
0.0.19 (2010-05-31)
|
22
|
+
===================
|
16
23
|
|
17
24
|
* Add a max redirect check to the remote driver
|
18
25
|
* Add Firefox::Profile#assume_untrusted_certificate_issuer=
|
@@ -4,20 +4,20 @@ module Selenium
|
|
4
4
|
module WebDriver
|
5
5
|
module Remote
|
6
6
|
module Http
|
7
|
-
|
7
|
+
|
8
|
+
#
|
9
|
+
# An alternative to the default Net::HTTP client.
|
8
10
|
#
|
9
|
-
# An alternative to the default Net::HTTP client.
|
10
|
-
#
|
11
11
|
# This can be used for the Firefox and Remote drivers if you have Curb
|
12
12
|
# installed.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# @example Using Curb
|
15
|
-
#
|
15
|
+
# require 'selenium/webdriver/remote/http/curb'
|
16
16
|
# include Selenium
|
17
|
-
#
|
17
|
+
#
|
18
18
|
# driver = WebDriver.for :firefox, :http_client => WebDriver::Remote::Http::Curb
|
19
|
-
#
|
20
|
-
|
19
|
+
#
|
20
|
+
|
21
21
|
class Curb < Common
|
22
22
|
|
23
23
|
private
|
@@ -26,6 +26,10 @@ module Selenium
|
|
26
26
|
client.url = url.to_s
|
27
27
|
client.headers = headers
|
28
28
|
|
29
|
+
# http://github.com/taf2/curb/issues/issue/33
|
30
|
+
client.head = false
|
31
|
+
client.delete = false
|
32
|
+
|
29
33
|
case verb
|
30
34
|
when :get
|
31
35
|
client.http_get
|
@@ -37,6 +41,8 @@ module Selenium
|
|
37
41
|
client.http_put
|
38
42
|
when :delete
|
39
43
|
client.http_delete
|
44
|
+
when :head
|
45
|
+
client.http_head
|
40
46
|
else
|
41
47
|
raise Error::WebDriverError, "unknown HTTP verb: #{verb.inspect}"
|
42
48
|
end
|
@@ -47,8 +53,10 @@ module Selenium
|
|
47
53
|
def client
|
48
54
|
@client ||= (
|
49
55
|
c = Curl::Easy.new
|
50
|
-
|
56
|
+
|
57
|
+
c.max_redirects = MAX_REDIRECTS
|
51
58
|
c.follow_location = true
|
59
|
+
c.timeout = self.class.timeout if self.class.timeout
|
52
60
|
|
53
61
|
c
|
54
62
|
)
|
@@ -11,7 +11,16 @@ module Selenium
|
|
11
11
|
|
12
12
|
def http
|
13
13
|
# ignoring SSL for now
|
14
|
-
@http ||=
|
14
|
+
@http ||= (
|
15
|
+
http = Net::HTTP.new @server_url.host, @server_url.port
|
16
|
+
|
17
|
+
if self.class.timeout
|
18
|
+
http.connect_timeout = self.class.timeout
|
19
|
+
http.read_timeout = self.class.timeout
|
20
|
+
end
|
21
|
+
|
22
|
+
http
|
23
|
+
)
|
15
24
|
end
|
16
25
|
|
17
26
|
def request(verb, url, headers, payload, redirects = 0)
|