A
Arindam
"Hi,
I am trying to to learn PERL, I am using it for an Automation Tool,
Selenium RC. My target is to open google. If the operation is
successful, I will open an existing excel sheet and write PASS, if it
fails, It will write Fail. I have installed the required library. The
code is as follows:-
--------------
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;
use Spreadsheet::WriteExcel;
use Spreadsheet:arseExcel;
use Spreadsheet:arseExcel::SaveParser;
print "\n\n **Enter You Browser Choice :: ";
my $browser = <STDIN>;
my $row;
my $col;
my $count;
my $sheet;
$row = 0;
$col = 0;
$sheet = 0;
$count = 1;
my $sel = Test::WWW:: Selenium->new( host => "localhost",
port => 4444,
browser => "*$browser",
browser_url => "http://www.google.uk/" );
my $parser = new Spreadsheet:arseExcel;
my $template = $parser->Parse("test_result.xls");
$template->AddCell(0, $row+1, $col, $browser);
if($sel->open_ok("http://www.google.co.uk/")){
$template->AddCell(0, $row+1, $col+1, "Home Page
:http://www.shopzilla.co.uk/"); $template->AddCell(0, $row, $col+2,
"Pass");
}
else{
$template->AddCell(0, $row+1, $col+3, "Fail");
---------------
After running the program, I am getting the following error:-
Can not locate object method "AddCell" via package "Spreadsheet::
ParseExcel ::Workbook"
I would be grateful, if anyone could give me some guidance to
resolve the problem.
Thanking You in Anticipation,
Arindam Pattanayak
===================="
I am trying to to learn PERL, I am using it for an Automation Tool,
Selenium RC. My target is to open google. If the operation is
successful, I will open an existing excel sheet and write PASS, if it
fails, It will write Fail. I have installed the required library. The
code is as follows:-
--------------
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;
use Spreadsheet::WriteExcel;
use Spreadsheet:arseExcel;
use Spreadsheet:arseExcel::SaveParser;
print "\n\n **Enter You Browser Choice :: ";
my $browser = <STDIN>;
my $row;
my $col;
my $count;
my $sheet;
$row = 0;
$col = 0;
$sheet = 0;
$count = 1;
my $sel = Test::WWW:: Selenium->new( host => "localhost",
port => 4444,
browser => "*$browser",
browser_url => "http://www.google.uk/" );
my $parser = new Spreadsheet:arseExcel;
my $template = $parser->Parse("test_result.xls");
$template->AddCell(0, $row+1, $col, $browser);
if($sel->open_ok("http://www.google.co.uk/")){
$template->AddCell(0, $row+1, $col+1, "Home Page
:http://www.shopzilla.co.uk/"); $template->AddCell(0, $row, $col+2,
"Pass");
}
else{
$template->AddCell(0, $row+1, $col+3, "Fail");
---------------
After running the program, I am getting the following error:-
Can not locate object method "AddCell" via package "Spreadsheet::
ParseExcel ::Workbook"
I would be grateful, if anyone could give me some guidance to
resolve the problem.
Thanking You in Anticipation,
Arindam Pattanayak
===================="