Hi I am trying to launch a browser and navigate to any URL. The firefox
or chormedrivers are invoked and suddenly closed throwing the following
error:
in `rescue in block in connect’: Failed to open TCP connection to
https:80 (getaddrinfo: No such host is known. ) (SocketError)
require ‘watir-webdriver’
$driver=Watir::Browser.new :firefox
$driver.driver.manage.timeouts.implicit_wait=10
$driver.goto “https://www.google.com/”
Can anyone suggest what might be the issue?
C:/Ruby23/lib/ruby/2.3.0/net/http.rb:882:in rescue in block in connect': Failed to open TCP connection to https:80 (getaddrinfo: No such host is known. ) (SocketError) from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:879:in
block in connect’
from C:/Ruby23/lib/ruby/2.3.0/timeout.rb:91:in block in timeout' from C:/Ruby23/lib/ruby/2.3.0/timeout.rb:101:in
timeout’
from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:878:in connect' from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:863:in
do_start’
from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:852:in start' from C:/Ruby23/lib/ruby/2.3.0/net/http.rb:1398:in
request’
from
C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/http/default.rb:107:in
response_for' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/http/default.rb:58:in
request’
from
C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/http/common.rb:59:in
call' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/bridge.rb:649:in
raw_execute’
from
C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/bridge.rb:123:in
create_session' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/bridge.rb:87:in
initialize’
from
C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/chrome/bridge.rb:48:in
initialize' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/common/driver.rb:64:in
new’
from
C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/common/driver.rb:64:in
for' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver.rb:84:in
for’