Firefox 62: get_attribute of nonexistent attribute dies in Selenium/Remote/Driver.pm

13 views
Skip to first unread message

Tod Hagan

unread,
Sep 14, 2018, 9:31:11 PM9/14/18
to selenium-re...@googlegroups.com
The error message is:
Error while executing command: unknown error: Failed to find value field at ~/perl5/lib/perl5/Selenium/Remote/Driver.pm line 391.
 at ~/perl5/lib/perl5/Selenium/Remote/Driver.pm line 348.

I haven't created an issue for it as this may be a geckodriver issue; its logs show "500 Internal Server Error" as seen here:

1536592986380    webdriver::server    DEBUG    -> GET /session/b425ec4a-e06a-4327-a131-503a3bdf8f88/element/d8b92fe9-62ec-47b2-9554-e1534e506f31/property/style
1536592986381    Marionette    TRACE    0 -> [0,4,"WebDriver:GetElementProperty",{"id":"d8b92fe9-62ec-47b2-9554-e1534e506f31","name":"style"}]
1536592986402    Marionette    TRACE    0 <- [1,4,null,{"alignContent":"","align-content":"","alignItems":"","align-items":"","alignSelf":"","align-self":"","animationDel ... getPropertyPriority":{},"setProperty":{},"removeProperty":{},"cssText":"","length":0,"parentRule":null,"getCSSImageURLs":{}}]
1536592986404    webdriver::server    DEBUG    <- 500 Internal Server Error {"value":{"error":"unknown error","message":"Failed to find value field","stacktrace":""}}

One workaround is to use Firefox ESR 60.

Code to reproduce follows.

#!/usr/bin/perl

use strict;
use warnings;

use Selenium::Firefox::Profile;
use Selenium::Firefox;

my $profile = Selenium::Firefox::Profile->new;
$profile->set_boolean_preference('browser.tabs.closeWindowWithLastTab'=>1);

my $sel = Selenium::Firefox->new(firefox_profile => $profile);
die "ERROR: new failed\n" unless $sel;

$sel->get('https://www.google.com');
sleep(1);
$sel->find_element(q{//input[@title='Search']})->get_attribute('style');

while (1) { sleep(10); }

George Baugh

unread,
Sep 19, 2018, 3:42:14 PM9/19/18
to Selenium Remote Driver
If you can work around it by using a different browser or driver version, it's almost certainly a driver issue.
Reply all
Reply to author
Forward
0 new messages