Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

WWW::Selenium woes

by InfiniteLoop (Hermit)
on Mar 07, 2006 at 17:22 UTC ( #534970=perlquestion: print w/replies, xml ) Need Help??

InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks,
 
I stumbled upon Selenium, a test tool for web applications. Aslo I found a CPAN module, WWW::Selenium, that acts as a perl driver for Selenium.

I have installed WWW::Selenium and while trying to execute the following sample code:
#!/usr/bin/perl -w use strict; use warnings; use WWW::Selenium; use WWW::Selenium::Launcher::MacDefault; my $selenium = WWW::Selenium->new; $selenium->open( 'http://localhost/selenium/SeleneseRunner.html' ); $selenium->verify_title( 'Some title' ); $selenium->click_and_wait( 'link_id' ); $selenium->stop;
I get the following error:

Error fetching result: Timed out! at /Library/Perl/5.8.6/WWW/Selenium/CommandBridge.pm line 45 at /Library/Perl/5.8.6/WWW/Selenium.pm line 106

I have read a couple of threads on the mailing list, but could not figure out how to solve this. Pls help.

Replies are listed 'Best First'.
Re: WWW::Selenium woes
by polettix (Vicar) on Mar 07, 2006 at 17:35 UTC
    Just a quick, obvious, blind checklist:
    • is a HTTP server running on localhost, listening to port TCP/80?
    • is the page /selenium/SeleneseRunner.html available through this HTTP server? Can you see from the browser, for example? Is the page correct?
    • have you identified which is the offending command among new, open, verify_title, click_and_wait and stop?
    • What's in line 106 of the module?

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.
      Yes, Im able to access the url via my browser. Also the command that WWW::Selenium executes seems to be 'open'.
      The line 106 is this code:
      my $result = $self->{bridge}->get_result;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://534970]
Approved by wfsp
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2020-05-27 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (152 votes). Check out past polls.

    Notices?