Closed coolo closed 6 years ago
Steps to reproduce & chromedriver/chrome versions used would be appreciated. The error you are encountering suggests that you are using either get_window_size or get_window_position (or the two setters of those). Would that be the case? If so, I wasn't able to observe this on latest chromium/chromedriver -- at/sanity-chrome.test specifically checks for this.
Is it possible this is a chrome/chromedriver version issue? If so, that's still fine and I should figure out some way to build in even more shims for chromedriver.
This likely means that chromedriver identifies itself the exact same way in pre-WD3 drivers as it does currently, which honestly isn't much of a shock now that I've been dealing with this. The fix would probably be to torture the driver until it confess()es that it isn't really WD3 capable at all.
If only API authors did something sane like provide a service catalog method. Then life would be easy.
Try above patch, I've disabled using WD3 set/get window rect on chrome with a hammer, and it seems to work fine on latest chrome/chromedriver.
Oh, you can always try the 'nuclear option' and just do $driver->{is_wd3} = 0 to force all interaction to be done by JSONWire methods.
this is stable chrome on travis and chromium 63 on my workstation - both show exactly the same error.
The patch worked for me, but I had to disable the tests to convince dist::zilla to install :)
And the code crashing isn't doing anything fancy:
From https://github.com/os-autoinst/openQA/blob/master/t/lib/OpenQA/SeleniumTest.pm
$_driver = Test::Selenium::Chrome->new(%opts);
$_driver->set_implicit_wait_timeout(2000);
$_driver->set_window_size(600, 800);
$_driver->get("http://localhost:$mojoport/");
Cool, looks like I figured it out then. OK, I'll get the unit tests' attitude adjusted, and will submit a new version to CPAN tonight. Thanks for the report.
Hi,
Since we updated to 1.21 I get this in my tests using chromedriver:
Uncaught exception from user code: Error while executing command: Server returned error message unknown command: session/8372c046bd9cba3aa5ac71062c685836/window/rect instead of data at /suse/coolo/perl5/lib/perl5/Selenium/Remote/Driver.pm line 378. at /suse/coolo/perl5/lib/perl5/Selenium/Remote/Driver.pm line 344.
This is 100% reproducible and a git bisect lead me to 3f6169175521acde6130e80ac0431de96089185b. This happens both in my perl 5.26 work station as on the perl 5.18 travis builds we do. E.g. https://travis-ci.org/os-autoinst/openQA/jobs/333771338