Hi All,
I've asked a question on
stackoverflow, only one response so far. The problem is when I use $sel->click_ok($locator) it won't click open.
The code I'm using is:
#!/usr/bin/perl
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;
use Env;
my $sel = Test::WWW::Selenium->new( host => "localhost",
port => 4444,
browser => "*firefox",
browser_url => "http://cpc.cs.qub.ac.uk/" );
$sel->open_ok("http://cpc.cs.qub.ac.uk/" , undef, "Getting Webpage CPC");
$sel->set_speed("1000");
$sel->wait_for_page_to_load_ok("10000");
$sel->select_frame_ok("toolbar");
$sel->click_ok(q(//a[@href="javascript:goTo('overview.html');"]));
$sel->wait_for_page_to_load_ok("10000");When I run it in the terminal, the ERROR message is: Value does not implement interface Event. I don't know if I'm missing some command before to
use javascripts.
The html code from the website:
<title>CPC Toolbar</title>
<script language="javascript" src="./toolbar.js"></script>
<tr>
<td align="center" >
<a href="javascript:goTo('overview.html');" onMouseover="libserv.src='icons/redlibserv.gif'" onMouseout="libserv.src='icons/bluelibserv.gif'"><IMG SRC="icons/bluelibserv.gif" name="libserv" width="100" height="20" border="0">
</a>
</td>
</tr>
Any help with this will be greatly appreciated, thanks in advance.
Hakim