A StaleElement exception generates warnings and the error message looks incomplete. Here's a script which forces such an exception:
#!/usr/bin/env perl
use strict;
use warnings;
use Firefox::Marionette;
my $fm = Firefox::Marionette->new;
$fm->go("http://www.example.org");
my $a = $fm->find('//a');
$fm->script(q{arguments[0].parentNode.removeChild(arguments[0]);}, args => [{"element-6066-11e4-a52e-4f735466cecf" => $a->uuid}]); # hack to make $a stale
warn $a->attribute("href");
__END__
Output:
Use of uninitialized value in concatenation (.) or string at /opt/perl-5.30.3/lib/site_perl/5.30.3/Firefox/Marionette/Exception/StaleElement.pm line 15.
Use of uninitialized value in concatenation (.) or string at /opt/perl-5.30.3/lib/site_perl/5.30.3/Firefox/Marionette/Exception/StaleElement.pm line 15.
Failed to find of " in /tmp/firefox-marionette-script-2.pl at line 11
It seems that using and value is undefined in this situation.
A StaleElement exception generates warnings and the error message looks incomplete. Here's a script which forces such an exception:
Output:
It seems that
using
andvalue
is undefined in this situation.