Skip to content

Instantly share code, notes, and snippets.

@mark0203
Created June 26, 2018 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mark0203/0ff120f1b106c88dfaea748031765496 to your computer and use it in GitHub Desktop.
Save mark0203/0ff120f1b106c88dfaea748031765496 to your computer and use it in GitHub Desktop.
Edge Webdriver - Errno::ECONNREFUSED: Failed to open TCP connection to localhost:17556 (No connection could be made because the target machine actively refused it. - connect(2) for "localhost" port 17556)
irb(main):001:0> require 'selenium-webdriver'
=> true
irb(main):002:0> driver = Selenium::WebDriver.for :edge
=> #<Selenium::WebDriver::Edge::Driver:0x5d567724 browser=:MicrosoftEdge>
irb(main):003:0> driver.navigate.to "http://google.com"
=> nil
irb(main):004:0> driver.title
=> "Google"
irb(main):005:0> driver.quit
Errno::ECONNREFUSED: Failed to open TCP connection to localhost:17556 (No connection could be made because the target machine actively refused it. - connect(2) for "localhost" port 17556)
from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:906:in `rescue in block in connect'
from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:903:in `block in connect'
from C:/Ruby24-x64/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
from C:/Ruby24-x64/lib/ruby/2.4.0/timeout.rb:103:in `timeout'
from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:902:in `connect'
from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1485:in `begin_transport'
from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1442:in `transport_request'
from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1416:in `request'
from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:1165:in `get'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/service.rb:128:in `block in stop_server'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/service.rb:108:in `block in connect_to_server'
from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:877:in `start'
from C:/Ruby24-x64/lib/ruby/2.4.0/net/http.rb:608:in `start'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/service.rb:104:in `connect_to_server'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/service.rb:128:in `stop_server'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/service.rb:77:in `stop'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/edge/driver.rb:67:in `quit'
from (irb):5
from C:/Ruby24-x64/bin/irb.cmd:19:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment