On Thu, 25 Feb 2016 14:18:14 -0700
Barry Roberts <[email protected]> wrote:
> I've never had much luck with Selenium IDE except as an introduction
> to the API. In theory, you should be able to export the test as a
> runnable python, java, or ruby program that will use the "real"
> selenium to control firefox. That's never worked for me without
> manual fixes to the exported file. But that was years ago.
Thanks. About as I figured. No export to Perl, either.
I installed WWW::Selenium and the selenium jar file. The jar file is
running with no problems. Like so, at least for now:
java -jar ./selenium-server-standalone-2.52.0.jar
I excerpted the sample program at the head of the WWW::Selenium
documentation. That works, except the wait_for_page_to_load times out
even though I can see the loaded page staring me in the face.
#!/usr/bin/perl -w
use WWW::Selenium;
my $sel = WWW::Selenium->new( host => "localhost",
port => 4444,
browser => "*firefox",
browser_url => "http://www.google.com",
);
$sel->start;
$sel->open("http://www.google.com");
$sel->type("q", "hello world");
$sel->click("btnG");
$sel->wait_for_page_to_load(50000);
print $sel->get_title;
$sel->stop;
--
The right of the people to be secure in their persons, houses, papers,
and effects, against unreasonable searches and seizures, shall not be
violated, and no Warrants shall issue, but upon probable cause,
supported by Oath or affirmation, and particularly describing the
place to be searched, and the persons or things to be seized.
-- U.S. Const. Amendment IV
Key fingerprint = CE5C 6645 A45A 64E4 94C0 809C FFF6 4C48 4ECD DFDB
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/