We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5d3644 commit 560a0aeCopy full SHA for 560a0ae
rb/lib/selenium/webdriver/devtools.rb
@@ -161,7 +161,18 @@ def wait
161
end
162
163
def socket
164
- @socket ||= TCPSocket.new(ws.host, ws.port)
+ @socket ||= begin
165
+ if URI(@url).scheme == 'ws'
166
+ socket = TCPSocket.new(ws.host, ws.port)
167
+ socket = OpenSSL::SSL::SSLSocket.new(socket, OpenSSL::SSL::SSLContext.new)
168
+ socket.sync_close = true
169
+ socket.connect
170
+
171
+ socket
172
+ else
173
+ TCPSocket.new(ws.host, ws.port)
174
+ end
175
176
177
178
def ws
0 commit comments