Open mhanberg opened 4 years ago
I remember I noticed that too, but it appears I was able to run FetchSessions
across all of the drivers WebDriverClient is currently supporting
If you wanted to run the web_driver_client tests against geckodriver directly you could edit WebDriverClient.IntegrationTesting.Scenarios
and add the following:
@scenarios
%Scenario{
driver: :geckodriver,
browser: :firefox,
session_configuration_name: :w3c_headless,
protocol: :w3c
}
get_start_session_payload/1
def get_start_session_payload(%Scenario{
driver: :geckodriver,
session_configuration_name: :w3c_headless
}) do
%{
capabilities: %{
alwaysMatch: %{
"moz:firefoxOptions" => %{
"args" => [
"-headless"
]
}
}
}
}
end
get_default_base_url/1
Once these updates are done, you should be able to run the geckodriver tests with
$ mix test --only integration_test_driver:geckodriver
I'm curious what you find out. I think I remember geckodriver was a bit buggy, but that could have been because I was trying to send JWP requests to it. 😉
Yes, I did all that, already. That is how I noticed that the calls to FetchSessions were failing.
I wonder if this means that FetchSessions
shouldn't be a supported command for w3c servers, since it technically isn't supported.
I think it's still useful for drivers that support it. Especially when when wallaby starts up chromedriver (I believe that returns a w3c response). Out of curiosity, what is the error being returned?
Returns a 405 Method Not Allowed.
Seems to return that for any endpoint that doesn't exists.
I think geckodriver also only supports one sessions per instance of the server, which might explain why it doesn't implement an endpoint to fetch all sessions.
I was playing around with the repo last night to see if it could run Geckodriver as a standalone server (no selenium), and I was seeing some failing tests when calling
FetchSessions
.After some investigations, it looks like that endpoint is not in the webdriver spec. Geckodriver has never implemented the JWP, which would explain why it doesn't implement that endpoint but chromedriver does.
Does that seem correct?
Thanks!
PS: I was wanting to see if geckodriver standalone would be faster than selenium+geckodriver