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

geckodriver julia> session = Session(wd) ERROR: KeyError: key :sessionId not found #24

Open programistawpf opened 2 months ago

programistawpf commented 2 months ago

The same code working with chromedriver.


julia> using DefaultApplication

julia> # DefaultApplication.open("chromedriver.exe")

julia> DefaultApplication.open("geckodriver.vbs")
Process(`'C:\Windows\system32\cmd.exe' /c start geckodriver.vbs`, ProcessRunning)

julia> sleep(1)

julia> capabilities = Capabilities("firefox")
Remote WebDriver Capabilities
browserName: firefox

julia> wd = RemoteWebDriver(capabilities, host = ENV["WEBDRIVER_HOST"], port = parse(Int, ENV["WEBDRIVER_PORT"])
julia> wd = RemoteWebDriver(capabilities, host = ENV["WEBDRIVER_HOST"], port = parse(Int, ENV["WEBDRIVER_PORT"])
)
Remote WebDriver

julia> status(wd)# kontrolnie
true

julia> session = Session(wd)
ERROR: KeyError: key :sessionId not found
Stacktrace:
 [1] getindex
   @ .\dict.jl:498 [inlined]
 [2] get(obj::JSON3.Object{Vector{UInt8}, Vector{UInt64}}, key::Symbol)
   @ JSON3 C:\Users\PC\.julia\packages\JSON3\jSAdy\src\JSON3.jl:87
 [3] getproperty(obj::JSON3.Object{Vector{UInt8}, Vector{UInt64}}, prop::Symbol)
   @ JSON3 C:\Users\PC\.julia\packages\JSON3\jSAdy\src\JSON3.jl:127
 [4] Session(wd::RemoteWebDriver{Capabilities{Nothing, Nothing, Nothing, Nothing}})
   @ WebDriver C:\Users\PC\.julia\packages\WebDriver\P9t79\src\01_structs\05_Session.jl:33
 [5] top-level scope
   @ REPL[9]:1

**

Environment