Nosferican / WebDriver.jl

A WebDriver / JSON Wire Protocol Binding Compatible with Selenium for the Julia Language.
https://nosferican.github.io/WebDriver.jl/dev/
ISC License
42 stars 12 forks source link

julia> status(wd) ERROR: HTTP.ConnectError #23

Open programistawpf opened 2 weeks ago

programistawpf commented 2 weeks ago

Is solution: If I run a driver with the port number, there is no problem "chromedriver ---port = 4444"

**julia> status(wd) ERROR: HTTP.ConnectError for url = http://localhost:4444/status: IOError: connect: connection refused (ECONNRE FUSED) Stacktrace: [1] getconnection(::Type{}, host::SubString{}, port::SubString{}; keepalive::Bool, readtimeout::Int64, kw::@Kwa rgs{}) @ HTTP.Connections C:\Users\PC.julia\packages\HTTP\sJD5V\src\Connections.jl:531 [2] getconnection @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\Connections.jl:508 [inlined] [3] #10 @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\Connections.jl:467 [inlined] [4] macro expansion @ C:\Users\PC.julia\packages\ConcurrentUtilities\QOkoO\src\try_with_timeout.jl:82 [inlined] [5] (::ConcurrentUtilities.var"#2#4"{})() @ ConcurrentUtilities C:\Users\PC.julia\packages\ConcurrentUtilities\QOkoO\src\ConcurrentUtilities.jl:9 Stacktrace: [1] (::HTTP.ConnectionRequest.var"#connections#4"{})(req::HTTP.Messages.Request; proxy::Nothing, socket_type:: Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, cl oseimmediately::Bool, kw::@Kwargs{}) @ HTTP.ConnectionRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\ConnectionRequest.jl:88 [2] connections @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\ConnectionRequest.jl:60 [inlined] [3] (::Base.var"#96#98"{})(args::HTTP.Messages.Request; kwargs::@Kwargs{}) @ Base .\error.jl:308 [4] (::HTTP.RetryRequest.var"#manageretries#3"{})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, ret ry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{}) @ HTTP.RetryRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\RetryRequest.jl:75 [5] manageretries @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\RetryRequest.jl:30 [inlined] [6] (::HTTP.CookieRequest.var"#managecookies#4"{})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP. Cookies.CookieJar, kw::@Kwargs{}) @ HTTP.CookieRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\CookieRequest.jl:42 [7] managecookies @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\CookieRequest.jl:19 [inlined] [8] (::HTTP.HeadersRequest.var"#defaultheaders#2"{})(req::HTTP.Messages.Request; iofunction::Nothing, decompre ss::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{}) @ HTTP.HeadersRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\HeadersRequest.jl:71 [9] defaultheaders @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\HeadersRequest.jl:14 [inlined] [10] (::HTTP.RedirectRequest.var"#redirects#3"{})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::I nt64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{}) @ HTTP.RedirectRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\RedirectRequest.jl:25 [11] redirects @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\RedirectRequest.jl:14 [inlined] [12] (::HTTP.MessageRequest.var"#makerequest#3"{})(method::String, url::URIs.URI, headers::Vector{}, body::Vect or{}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@ Kwargs{}) @ HTTP.MessageRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\MessageRequest.jl:35 [13] makerequest @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\MessageRequest.jl:24 [inlined] [14] request(stack::HTTP.MessageRequest.var"#makerequest#3"{}, method::String, url::String, h::Vector{}, b::Vec tor{}, q::Nothing; headers::Vector{}, body::Vector{}, query::Nothing, kw::@Kwargs{}) @ HTTP C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:457 [15] request(stack::Function, method::String, url::String, h::Vector{Pair{String, String}}, b::Vector{UInt8}, q ::Nothing) @ HTTP C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:455 [16] #request#20 @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:315 [inlined] [17] request (repeats 2 times) @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:313 [inlined] [18] get @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:518 [inlined] [19] status(wd::RemoteWebDriver{Capabilities{Nothing, Nothing, Nothing, Nothing}}) @ WebDriver C:\Users\PC.julia\packages\WebDriver\P9t79\src\02_commands\01_Sessions\03_Status.jl:8 [20] top-level scope @ REPL[4]:1

caused by: IOError: connect: connection refused (ECONNREFUSED) Stacktrace: [1] getconnection(::Type{}, host::SubString{}, port::SubString{}; keepalive::Bool, readtimeout::Int64, kw::@Kwa rgs{}) @ HTTP.Connections C:\Users\PC.julia\packages\HTTP\sJD5V\src\Connections.jl:531 [2] getconnection @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\Connections.jl:508 [inlined] [3] #10 @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\Connections.jl:467 [inlined] [4] macro expansion @ C:\Users\PC.julia\packages\ConcurrentUtilities\QOkoO\src\try_with_timeout.jl:82 [inlined] [5] (::ConcurrentUtilities.var"#2#4"{})() @ ConcurrentUtilities C:\Users\PC.julia\packages\ConcurrentUtilities\QOkoO\src\ConcurrentUtilities.jl:9 Stacktrace: [1] try_yieldto(undo::typeof(Base.ensure_rescheduled)) @ Base .\task.jl:931 [2] wait() @ Base .\task.jl:995 [3] wait(c::Base.GenericCondition{ReentrantLock}; first::Bool) @ Base .\condition.jl:130 [4] wait @ .\condition.jl:125 [inlined] [5] take_unbuffered(c::Channel{Any}) @ Base .\channels.jl:494 [6] take! @ .\channels.jl:471 [inlined] [7] try_with_timeout(f::Function, timeout::Int64, ::Type{Any}) @ ConcurrentUtilities C:\Users\PC.julia\packages\ConcurrentUtilities\QOkoO\src\try_with_timeout.jl:89 [8] try_with_timeout @ C:\Users\PC.julia\packages\ConcurrentUtilities\QOkoO\src\try_with_timeout.jl:77 [inlined] [9] (::HTTP.Connections.var"#9#12"{Sockets.TCPSocket, Int64, Int64, Bool, Bool, @Kwargs{}, SubString{}, SubStr ing{}})() @ HTTP.Connections C:\Users\PC.julia\packages\HTTP\sJD5V\src\Connections.jl:464 [10] acquire(f::HTTP.Connections.var"#9#12"{}, pool::ConcurrentUtilities.Pools.Pool{}, key::Tuple{}; forcenew:: Bool, isvalid::HTTP.Connections.var"#11#14"{}) @ ConcurrentUtilities.Pools C:\Users\PC.julia\packages\ConcurrentUtilities\QOkoO\src\pools.jl:159 [11] acquire @ C:\Users\PC.julia\packages\ConcurrentUtilities\QOkoO\src\pools.jl:140 [inlined] [12] #newconnection#8 @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\Connections.jl:459 [inlined] [13] (::HTTP.ConnectionRequest.var"#connections#4"{})(req::HTTP.Messages.Request; proxy::Nothing, socket_type:: Type, socket_type_tls::Nothing, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, cl oseimmediately::Bool, kw::@Kwargs{}) @ HTTP.ConnectionRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\ConnectionRequest.jl:82 [14] connections @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\ConnectionRequest.jl:60 [inlined] [15] (::Base.var"#96#98"{})(args::HTTP.Messages.Request; kwargs::@Kwargs{}) @ Base .\error.jl:308 [16] (::HTTP.RetryRequest.var"#manageretries#3"{})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, ret ry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@Kwargs{}) @ HTTP.RetryRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\RetryRequest.jl:75 [17] manageretries @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\RetryRequest.jl:30 [inlined] [18] (::HTTP.CookieRequest.var"#managecookies#4"{})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP. Cookies.CookieJar, kw::@Kwargs{}) @ HTTP.CookieRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\CookieRequest.jl:42 [19] managecookies @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\CookieRequest.jl:19 [inlined] [20] (::HTTP.HeadersRequest.var"#defaultheaders#2"{})(req::HTTP.Messages.Request; iofunction::Nothing, decompre ss::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@Kwargs{}) @ HTTP.HeadersRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\HeadersRequest.jl:71 [21] defaultheaders @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\HeadersRequest.jl:14 [inlined] [22] (::HTTP.RedirectRequest.var"#redirects#3"{})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::I nt64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@Kwargs{}) @ HTTP.RedirectRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\RedirectRequest.jl:25 [23] redirects @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\RedirectRequest.jl:14 [inlined] [24] (::HTTP.MessageRequest.var"#makerequest#3"{})(method::String, url::URIs.URI, headers::Vector{}, body::Vect or{}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@ Kwargs{}) @ HTTP.MessageRequest C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\MessageRequest.jl:35 [25] makerequest @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\clientlayers\MessageRequest.jl:24 [inlined] [26] request(stack::HTTP.MessageRequest.var"#makerequest#3"{}, method::String, url::String, h::Vector{}, b::Vec tor{}, q::Nothing; headers::Vector{}, body::Vector{}, query::Nothing, kw::@Kwargs{}) @ HTTP C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:457 [27] request(stack::Function, method::String, url::String, h::Vector{Pair{String, String}}, b::Vector{UInt8}, q ::Nothing) @ HTTP C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:455 [28] #request#20 @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:315 [inlined] [29] request (repeats 2 times) @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:313 [inlined] [30] get @ C:\Users\PC.julia\packages\HTTP\sJD5V\src\HTTP.jl:518 [inlined] [31] status(wd::RemoteWebDriver{Capabilities{Nothing, Nothing, Nothing, Nothing}}) @ WebDriver C:\Users\PC.julia\packages\WebDriver\P9t79\src\02_commands\01_Sessions\03_Status.jl:8 [32] top-level scope @ REPL[4]:1 ** A clear and concise description of what the bug is.

Environment

ins sys win 7/64 WEBDRIVER_HOST=localhost WEBDRIVER_PORT=4444

programistawpf commented 2 weeks ago

Solution: If I run a driver with the port number, there is no problem "chromedriver ---port = 4444"