teodesian / Selenium-Remote-Driver

Perl Bindings to the Selenium Webdriver server
174 stars 90 forks source link

get_sessions method is not working #434

Closed pavelsr closed 4 years ago

pavelsr commented 5 years ago

There is no GET /sessions method in current WebDriver JSON API so get_sessions method will always die with 404 error

Prepping getSessions
Executing getSessions
Falling back to legacy selenium method for getSessions
REQ: GET, http://localhost:4444/wd/hub/sessions, {}
RES: 404 page not found

I suggest to remove this method.

You can always get session_id like this:


my $driver = Selenium::Remote::Driver->new(%params);
$driver->get('https://example.com');
warn $driver->session_id;
``
teodesian commented 5 years ago

It's still part of the JSONWire spec, and we are built to work with both and be backwards compatible as much as is possible.

As such the correct course of action is instead to simply throw when in WC3 mode.