teodesian / Selenium-Remote-Driver

Perl Bindings to the Selenium Webdriver server
173 stars 91 forks source link

Selenium::Firefox set_timeout() Error #413

Closed bb10128 closed 5 years ago

bb10128 commented 5 years ago

The following script does not run with -- perl 5.26 -- geckodriver v0.23 -- Firefox browser v64.0

------------- Script -------------

use strict; use warnings; use Selenium::Firefox;

my $driver = Selenium::Firefox->new;

Both lines below would work with geckodriver v0.21.0,

but would crash with v0.23.0, under

-- perl 5.26.1 (Ubuntu 18.04 LTS)

-- Strawberry perl 5.24.1 (WinPro 7)

$driver->set_timeout('page load', 15000); $driver->set_implicit_wait_timeout(10000);

------------- End -------------

teodesian commented 5 years ago

Sounds a lot like #409, will see if I can repro tomorrow. I suspect it's just the driver authors breaking stuff again.

bb10128 commented 5 years ago

I presume this is due to https://developer.mozilla.org/en-US/docs/Web/WebDriver/Timeouts.

Can we fix this by introducing a new option in Selenium::Firefox->new? Similar to the way marionette_enabled option is used to support different generations of Firefox browsers?

teodesian commented 5 years ago

reproduced.

Error while executing command: invalid argument: unknown field `type`, expected one of `implicit`, `pageLoad`, `script` at line 1 column 7 at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/Selenium/Remote/Driver.pm line 391.

These weasels have decided to change the wc3 standard. I'm shocked, simply shocked.

The good news is it seems they just changed it back to the old JSONWire way of doing stuff.

teodesian commented 5 years ago

Heh, so this was working because I was passing the old-style arguments previously (due to chrome), and they were simply not being picky about the extra wc3 args. So, I guess I gotta add a chrome polyfill now...

teodesian commented 5 years ago

OK, I've got a fix...but gonna have to wait until tonight to test on windows. Will try to get fix released this weekend.

teodesian commented 5 years ago

Edgedriver still following old standard version

Gonna have to adjust