selenium-webdriver 2.27.2 → 2.29.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +14 -0
- data/lib/selenium/webdriver/common/port_prober.rb +5 -2
- data/lib/selenium/webdriver/firefox/binary.rb +5 -1
- data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
- data/lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so +0 -0
- data/lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so +0 -0
- data/lib/selenium/webdriver/safari.rb +1 -1
- data/lib/selenium/webdriver/safari/bridge.rb +3 -3
- data/lib/selenium/webdriver/safari/server.rb +20 -16
- metadata +4 -4
data/CHANGES
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
2.29.0 (2013-01-21)
|
2
|
+
===================
|
3
|
+
|
4
|
+
Firefox:
|
5
|
+
* Firefox 18 support (for native events).
|
6
|
+
IE:
|
7
|
+
* New 'requireWindowFocus' desired capability.
|
8
|
+
* IE view port calculation take scroll bars into account (#3602)
|
9
|
+
Safari:
|
10
|
+
* Replace 'libwebsocket' with 'websocket' gem. This should ensure
|
11
|
+
support with recent Safari.
|
12
|
+
Other:
|
13
|
+
* Fix Cygwin issue in PortProber/Firefox::Bianry (#4963)
|
14
|
+
|
1
15
|
2.27.2 (2012-12-11)
|
2
16
|
===================
|
3
17
|
|
@@ -19,12 +19,15 @@ module Selenium
|
|
19
19
|
port
|
20
20
|
end
|
21
21
|
|
22
|
+
IGNORED_ERRORS = [Errno::EADDRNOTAVAIL]
|
23
|
+
IGNORED_ERRORS << Errno::EBADF if Platform.cygwin?
|
24
|
+
|
22
25
|
def self.free?(port)
|
23
26
|
Platform.interfaces.each do |host|
|
24
27
|
begin
|
25
28
|
TCPServer.new(host, port).close
|
26
|
-
rescue
|
27
|
-
$stderr.puts "port prober could not bind to #{host}:#{port}" if $DEBUG
|
29
|
+
rescue *IGNORED_ERRORS => ex
|
30
|
+
$stderr.puts "port prober could not bind to #{host}:#{port} (#{ex.message})" if $DEBUG
|
28
31
|
# ignored - some machines appear unable to bind to some of their interfaces
|
29
32
|
end
|
30
33
|
end
|
@@ -15,7 +15,11 @@ module Selenium
|
|
15
15
|
QUIT_TIMEOUT = 5
|
16
16
|
|
17
17
|
def start_with(profile, profile_path, *args)
|
18
|
-
|
18
|
+
if Platform.cygwin?
|
19
|
+
profile_path = Platform.cygwin_path(profile_path, :windows => true)
|
20
|
+
elsif Platform.windows?
|
21
|
+
profile_path = profile_path.gsub("/", "\\")
|
22
|
+
end
|
19
23
|
|
20
24
|
ENV['XRE_CONSOLE_LOG'] = profile.log_file if profile.log_file
|
21
25
|
ENV['XRE_PROFILE_PATH'] = profile_path
|
Binary file
|
Binary file
|
Binary file
|
@@ -15,8 +15,8 @@ module Selenium
|
|
15
15
|
@server = Server.new(port, timeout)
|
16
16
|
@server.start
|
17
17
|
|
18
|
-
@
|
19
|
-
@
|
18
|
+
@safari = Browser.new
|
19
|
+
@safari.start(prepare_connect_file)
|
20
20
|
|
21
21
|
@server.wait_for_connection
|
22
22
|
|
@@ -27,7 +27,7 @@ module Selenium
|
|
27
27
|
super
|
28
28
|
|
29
29
|
@server.stop
|
30
|
-
@
|
30
|
+
@safari.stop
|
31
31
|
end
|
32
32
|
|
33
33
|
def driver_extensions
|
@@ -6,7 +6,6 @@ module Selenium
|
|
6
6
|
def initialize(port, command_timeout)
|
7
7
|
@port = port
|
8
8
|
@command_timeout = command_timeout
|
9
|
-
@frame = LibWebSocket::Frame.new
|
10
9
|
end
|
11
10
|
|
12
11
|
def start
|
@@ -22,13 +21,15 @@ module Selenium
|
|
22
21
|
json = WebDriver.json_dump(command)
|
23
22
|
puts ">>> #{json}" if $DEBUG
|
24
23
|
|
25
|
-
frame =
|
24
|
+
frame = WebSocket::Frame::Outgoing::Server.new(:version => @version, :data => json, :type => :text)
|
26
25
|
|
27
|
-
@ws.write frame
|
26
|
+
@ws.write frame.to_s
|
28
27
|
@ws.flush
|
29
28
|
end
|
30
29
|
|
31
30
|
def receive
|
31
|
+
@frame ||= WebSocket::Frame::Incoming::Server.new(:version => @version)
|
32
|
+
|
32
33
|
until msg = @frame.next
|
33
34
|
end_time = Time.now + @command_timeout
|
34
35
|
|
@@ -44,12 +45,12 @@ module Selenium
|
|
44
45
|
retry
|
45
46
|
end
|
46
47
|
|
47
|
-
@frame
|
48
|
+
@frame << data
|
48
49
|
end
|
49
50
|
|
50
51
|
puts "<<< #{msg}" if $DEBUG
|
51
52
|
|
52
|
-
WebDriver.json_load msg
|
53
|
+
WebDriver.json_load msg.to_s
|
53
54
|
end
|
54
55
|
|
55
56
|
def ws_uri
|
@@ -107,29 +108,32 @@ window.onload = function() {
|
|
107
108
|
|
108
109
|
def process_handshake
|
109
110
|
@ws = @server.accept
|
110
|
-
hs =
|
111
|
+
hs = WebSocket::Handshake::Server.new
|
111
112
|
|
112
113
|
req = ''
|
113
|
-
until hs.
|
114
|
+
until hs.finished?
|
114
115
|
data = @ws.getc || next
|
116
|
+
|
115
117
|
req << data.chr
|
118
|
+
hs << data
|
119
|
+
end
|
116
120
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
end
|
121
|
+
unless hs.valid?
|
122
|
+
if req.include? "favicon.ico"
|
123
|
+
@ws.close
|
124
|
+
process_handshake
|
125
|
+
return
|
126
|
+
else
|
127
|
+
raise Error::WebDriverError, "#{hs.error}: #{req}"
|
125
128
|
end
|
126
129
|
end
|
127
130
|
|
128
131
|
@ws.write(hs.to_s)
|
129
132
|
@ws.flush
|
130
133
|
|
131
|
-
puts "handshake complete" if $DEBUG
|
134
|
+
puts "handshake complete, v#{hs.version}" if $DEBUG
|
132
135
|
@server.close
|
136
|
+
@version = hs.version
|
133
137
|
end
|
134
138
|
end
|
135
139
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: selenium-webdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.
|
5
|
+
version: 2.29.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jari Bakken
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2013-01-21 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -47,14 +47,14 @@ dependencies:
|
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: websocket
|
51
51
|
prerelease: false
|
52
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
55
|
- - ~>
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.
|
57
|
+
version: 1.0.4
|
58
58
|
type: :runtime
|
59
59
|
version_requirements: *id004
|
60
60
|
- !ruby/object:Gem::Dependency
|