# (c) 2010 Matt S Trout (mst) # same license as perl # mail ideas, suggestions and flames to mst (at) shadowcat.co.uk # proof of concept only # no warranty, express or implied # # vnc4server :21 # DISPLAY=:21 perl -MAlien::SeleniumRC -e 'Alien::SeleniumRC::start' use strict; use warnings; use Test::More qw(no_plan); use Socialtext::WikiFixture::Selenese; use HTML::TableExtract; # HTML ripped from http://seleniumhq.org/docs/05_selenium_rc.html#from-selense-to-a-program my $html = <
open /  
type q selenium rc
clickAndWait btnG  
textLike Searches related to selenium rc  
END my $te = HTML::TableExtract->new; $te->parse($html); my $table = ($te->tables)[0]; my @rows = map { [ map { $_ eq "\240" ? () : $_ } @$_ ] } $table->rows; $ENV{selenium_browser} = '*firefox /usr/lib/iceweasel/firefox-bin'; my $wf = Socialtext::WikiFixture::Selenese->new( host => 'localhost', port => $< + 6900, browser_url => 'http://www.google.com' ); $wf->run_test_table(\@rows);