Hi,
Has anyone succeeded using Selenium::Firefox/Selenium::Remote::Driver and marionette enabled (FF>V47)? I tried several versions of geckodriver and Firefox, but the result is the same. I can start FF and access an url like
google.com, but some of the S:R:D function terminate with unknown command.
Is there a way to configure the latest releases of FF, S:R:D, and geckodriver to work?
Thank you,
Fred
Example script:
use Selenium::Remote::Driver;
use Selenium::Firefox;
use Selenium::Remote::Driver::Firefox::Profile;
my $toolsPath='D:\Perforce\vmAutomation\InternalTools\Automation\Tools';
my $extraCaps = {
#"browser" => "Firefox",
"browser_version" => "48.0",
"os" => "Windows",
"os_version" => "7",
"resolution" => "1024x768",
"platform" => 'WINDOW'
};
my $driver = Selenium::Firefox->new( 'marionette_enabled' => 'true',
'binary' => "$toolsPath\\geckodriver.exe",
'custom_args' => '--log trace',
'extra_capabilities' => $extraCaps
);
$driver->debug_on();
$driver->get("
http://google.com");
$driver->maximize_window();
sleep 10;
S:R:D log:
REQ: POST, http://127.0.0.1:9090/session/761313eb-b0e1-44ef-894b-b4e098b8a9b1/url, {"url":"http://google.com"}
RES: {}
REQ: POST, http://127.0.0.1:9090/session/761313eb-b0e1-44ef-894b-b4e098b8a9b1/window/current/maximize, {}
RES: {"error":"unknown command","message":"POST /session/761313eb-b0e1-44ef-894b-b4e098b8a9b1/window/current/maximize did not match a known command"}
Use of uninitialized value in hash element at C:/Strawberry/perl/site/lib/Selenium/Remote/ErrorHandler.pm line 126.
REQ: DELETE, http://127.0.0.1:9090/session/761313eb-b0e1-44ef-894b-b4e098b8a9b1, {}
RES: {}
geckodriver log:
4
99520849015 hyper::server::request DEBUG Request Line: Post AbsolutePath("/session/761313eb-b0e1-44ef-894b-b4e098b8a9b1/window/current/maximize") Http11
1499520849015 hyper::server::request DEBUG Headers { Connection: TE, close, Host: 127.0.0.1:9090, Content-Type: application/json; charset=utf-8, TE: deflat
e,gzip;q=0.3, Accept: application/json, Content-Length: 2, User-Agent: libwww-perl/6.15, }
1499520849015 hyper::header TRACE Headers.set( "Connection", Connection([Close]) )
1499520849015 hyper::http::h1 TRACE Sized read, remaining=2
1499520849015 hyper::http::h1 TRACE Sized read: 2
1499520849015 hyper::http::h1 TRACE Sized read, remaining=0
1499520849015 webdriver::server DEBUG Got request POST AbsolutePath("/session/761313eb-b0e1-44ef-894b-b4e098b8a9b1/window/current/maximize")
1499520849016 webdriver::server DEBUG Returning status NotFound1499520849016 webdriver::server DEBUG Returning body {"error":"unknown command","message":"POST /session/761313eb-b0e1-44ef-894b-b4e098b8a9b1/window/c
urrent/maximize did not match a known command"}
1499520849016 hyper::header TRACE Headers.set( "Content-Type", ContentType(Mime(Application, Json, [])) )
1499520849016 hyper::header TRACE Headers.set( "Content-Length", ContentLength(144) )
1499520849016 hyper::server::response DEBUG writing head: Http11 NotFound
1499520849016 hyper::header TRACE Headers.set( "Date", Date(HttpDate(Tm { tm_sec: 9, tm_min: 34, tm_hour: 13, tm_mday: 8, tm_mon: 6, tm_year: 117, tm_wday
: 6, tm_yday: 188, tm_isdst: 0, tm_utcoff: 0, tm_nsec: 16060300 })) )
1499520849016 hyper::server::response DEBUG headers [
Headers { Connection: close, Content-Type: application/json, Content-Length: 144, Date: Sat, 08 Jul 2017 13:34:09 GMT, }]
1499520849016 hyper::server::response DEBUG write 144 bytes
1499520849016 hyper::server::response TRACE ending
1499520849016 hyper::server DEBUG keep_alive = false for 127.0.0.1:31870
1499520849016 hyper::server DEBUG keep_alive loop ending for 127.0.0.1:31870