WebDriver.jl icon indicating copy to clipboard operation
WebDriver.jl copied to clipboard

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

Open programistawpf opened this issue 6 months ago • 0 comments

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

  • julia> versioninfo() Julia Version 1.10.4 Commit 48d4fd4843 (2024-06-04 10:41 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Windows (x86_64-w64-mingw32) CPU: 8 × Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, sandybridge) Threads: 8 default, 0 interactive, 4 GC (on 8 virtual cores)

  • (@v1.10) pkg> st StatusC:\Users\PC.julia\environments\v1.10\Project.toml [54eefc05] Cascadia v1.0.2 [3f0dd361] DefaultApplication v1.1.0 [5789e2e9] FileIO v1.16.3 [92fee26a] GZip v0.6.2 [708ec375] Gumbo v0.8.2 [f67ccb44] HDF5 v0.17.2 [cd3eb016] HTTP v1.10.8 [4138dd39] JLD v0.13.5 [69024149] StringEncodings v0.3.7 [05625dda] WebDriver v0.2.0 [bd07be1c] Winston v1.0.1

  • geckodriver-v0.33.0-win64

  • Firefox 102.090esr

  • selenium Version: 4.23.1

programistawpf avatar Aug 27 '24 12:08 programistawpf