Just tried installing on a Linux box, but the CPAN install failed. This 
reminded me that I had to force the install on the WinXP machine to get that 
to install as the same test failed on that too.

Here is the log from the Linux install.

cpan[1]> install WWW::Selenium                                                  
                                                                            
Going to read '/root/.cpan/Metadata'                                            
                                                                            
  Database was generated on Thu, 05 Apr 2012 02:12:19 GMT
Running install for module 'WWW::Selenium'                                      
                                                                            
Running make for L/LU/LUKEC/Test-WWW-Selenium-1.32.tar.gz                       
                                                                            
Checksum 
for /root/.cpan/sources/authors/id/L/LU/LUKEC/Test-WWW-Selenium-1.32.tar.gz 
ok
Scanning cache /root/.cpan/build for sizes                                      
                                                                            
............................................................................DONE
                                                                            
                                                                                
                                                                            
  CPAN.pm: Going to build L/LU/LUKEC/Test-WWW-Selenium-1.32.tar.gz              
                                                                            
                                                                                
                                                                            
Checking if your kit is complete...
Looks good                                                                      
                                                                            
Writing Makefile for Test::WWW::Selenium                                        
                                                                            
cp lib/WWW/Selenium.pm blib/lib/WWW/Selenium.pm
cp mypod2html.pl blib/lib/Test/WWW/mypod2html.pl                                
                                                                            
cp lib/Test/WWW/Selenium.pm blib/lib/Test/WWW/Selenium.pm                       
                                                                            
cp lib/Devel/REPL/Plugin/Selenium.pm blib/lib/Devel/REPL/Plugin/Selenium.pm     
                                                                            
cp lib/WWW/Selenium/Util.pm blib/lib/WWW/Selenium/Util.pm                       
                                                                            
Manifying blib/man3/WWW::Selenium.3pm                                           
                                                                            
Manifying blib/man3/Devel::REPL::Plugin::Selenium.3pm                           
                                                                            
Manifying blib/man3/Test::WWW::Selenium.3pm
Manifying blib/man3/WWW::Selenium::Util.3pm                                     
                                                                            
  LUKEC/Test-WWW-Selenium-1.32.tar.gz                                           
                                                                            
  /usr/bin/make -- OK
'YAML' not installed, will not store persistent state                           
                                                                            
Running make test                                                               
                                                                            
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" 
t/*.t                                             
t/00-compile.t ........... Can't locate Devel/REPL/Plugin.pm in @INC (@INC 
contains: 
lib /root/.cpan/build/Test-WWW-Selenium-1.32-UsZLtW/blib/lib 
/root/.cpan/build/Test-WWW-Selenium-1.32-UsZLtW/blib/arch /usr/local/lib/perl5 
/usr/local/share/perl5 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl5 
/usr/share/perl5 /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi 
/usr/local/lib/perl5/site_perl/5.10.0 
/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi 
/usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl .) 
at lib/Devel/REPL/Plugin/Selenium.pm line 6.
BEGIN failed--compilation aborted at lib/Devel/REPL/Plugin/Selenium.pm line 6.
Compilation failed in require at -e line 1.
t/00-compile.t ........... 1/4 
#   Failed test 'Devel::REPL::Plugin::Selenium loaded ok'
#   at t/00-compile.t line 62.
#                   ''
#     doesn't match '(?s-xim:^\s*Devel::REPL::Plugin::Selenium ok)'
# Looks like you failed 1 test of 4.
t/00-compile.t ........... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 
t/01_load.t .............. ok   
t/interweb.t ............. skipped: not running live interweb tests
t/selenium-compat.t ...... ok     
t/selenium-core.t ........ ok     
t/selenium-dwim.t ........ ok     
t/selenium-rc.t .......... ok     
t/test-selenium.t ........ ok     
t/test_default_server.t .. # Test::WWW::Selenium running open 
(file:///root/.cpan/build/Test-WWW-Selenium-1.32-UsZLtW/t/files/test_click_page1.html)
t/test_default_server.t .. 1/7 # Test::WWW::Selenium running get_text (link 
(?-xism:Click here for next page) link contains expected text)
# Test::WWW::Selenium running get_location ((?-xism:test_click_page2\.html))
# Test::WWW::Selenium running get_location ((?-xism:test_click_page1\.html))
# Test::WWW::Selenium running open 
(file:///root/.cpan/build/Test-WWW-Selenium-1.32-UsZLtW/t/files/test_click_page1.html)
t/test_default_server.t .. ok   
t/test_google.t .......... ok   
t/test_i18n.t ............ ok     
t/timeouts.t ............. ok   

Test Summary Report
-------------------
t/00-compile.t         (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=12, Tests=351, 37 wallclock secs ( 0.24 usr  0.05 sys +  2.89 cusr  0.31 
csys =  3.49 CPU)
Result: FAIL
Failed 1/12 test programs. 1/351 subtests failed.
make: *** [test_dynamic] Error 255
  LUKEC/Test-WWW-Selenium-1.32.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports LUKEC/Test-WWW-Selenium-1.32.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 LUKEC/Test-WWW-Selenium-1.32.tar.gz          : make_test NO

cpan[2]> 

On Thursday 05 April 2012 12:21:44 Gary Stainburn wrote:
> Hi folks.
>
> Returning to Perl on Win32 for the first time in ages. Installed Strawberry
> Perl and WWW::Selenium.  However, when I run the example in the CPAN help
> page, it hangs because the $sel->click doesn't work.
>
> If I manually click on the button the rest of the script works fine.
>
> Anyone got any ideas why and what I need to do to fix it?
> Alternatively, does anyone have experience of installing WWW::Selenium on a
> Linux box and using it to control a Windows machine?
>
> Example Script
>
>     use WWW::Selenium;
>
>     my $sel = WWW::Selenium->new( host => "localhost",
>                                   port => 4444,
>                                   browser => "*iexplore",
>                                   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(5000);
>     print $sel->get_title;
>     $sel->stop;



-- 
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk 

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to