david-dick / firefox-marionette

This is a client module to automate the Mozilla Firefox browser via the Marionette protocol
https://metacpan.org/dist/Firefox-Marionette
Other
12 stars 3 forks source link

current_chrome_window_handle and chrome_window_handle fail on FreeBSD 13.0 #12

Closed prozorecJP closed 2 years ago

prozorecJP commented 2 years ago

Hi.

I tried Firefox::Marionette on FreeBSD 13.0-p4 and I encountered the problem when calling current_chrome_window_handle and chrome_window_handle. It said "unknown command: WebDriver:GetCurrentChromeWindowHandle" and stopped.

This is the script I tried.

use strict; use warnings;

use Firefox::Marionette;

my $firefox = Firefox::Marionette->new ( 'visible' => 1, 'survive' => 1 );

sleep (3);

my $cu_handle = eval { $firefox->current_chrome_window_handle() }; if ($@) { print "current_chrome_window_handle failed $@\n"; } my $ch_handle = eval { $firefox->chrome_window_handle() }; if ($@) { print "chrome_window_handle failed $@\n"; }

Firefox version on FreeBSD 13 is 94.0.

david-dick commented 2 years ago

okay. script works no issues on Fedora. will try to replicate on FreeBSD.

david-dick commented 2 years ago

okay. duplicated on FreeBSD 13

david-dick commented 2 years ago

Looks linked to this change

david-dick commented 2 years ago

Still running testing, but this patch seems to work for me? Can you try it out and see if it works for you?

prozorecJP commented 2 years ago

Thank you, the patch works fine for me as well.