in reply to Re: Selenium: Trying to resize window from Perl: getting a mysterious JavaScript error
in thread Selenium: Trying to resize window from Perl: getting a mysterious JavaScript error
Thank you, Corion, for your trustworthy help, as always.
This snippet in the OP:
$res = $sel->get_eval( q{ WebDriver driver = ((WebDriverBackedSelenium +) selenium).getWrappedDriver(); driver.manage().window().setSize(1040,768);} );
does define "driver" ok.
As you can see, when replacing it with:
my $js = q{((WebDriverBackedSelenium) selenium).getWrappedDriver().man +age().window().setSize(1040,720);} ; $sel->get_eval($js):
(as suggested in Matthias' comment here: http://stackoverflow.com/questions/24585497),
it produces the error:
missing ) in parenthetical
This is typically a javascript error not pointing to a missing parentheses, but instead to invalid javascript, for some reason (sometimes: bad string representation)
(see Slaks' comment here: http://stackoverflow.com/questions/18242512).
This leads me to think that somehow, the Perl WWW::Selenium module is not passing on right the javascript string to the Selenium server.
See here, too: http://geekandpirate.wordpress.com/2010/12/11/missing-in-parenthetical/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Selenium: Trying to resize window from Perl: getting a mysterious JavaScript error
by daluu (Initiate) on Jul 07, 2014 at 06:06 UTC | |
by HelenCr (Monk) on Jul 12, 2014 at 03:36 UTC |