Hello Experts,
I'm using Selenium RC with Perl client driver. I'm trying to take the screen shot of a page loaded and trying to use the command "captureEntirePageScreenshot" which will be converted to $sel->capture_entire_page_screenshot_ok("C:\\Screenshot.png", ""); since I'm using perl. When i run the test i get the following error
Can't locate object method "capture_entire_page_screenshot" via package "Test::WWW::Selenium" (also tried "WWW::Selenium) at C:/perlapache/Perl/lib/Test/WWW/Selenium.pm line 144
Can anyone tell me is this command available for perl client driver or not...i just couldn't find much details for this.
Thanks in advance experts...
Shashi
Any idea guys on this!!! I'm still waiting for your valuable answers...
Thanks in advance
Shashi
I think it should be available to the Perl client driver in subversion. What version are you using?
Haw-Bin
I'm using Selenium 1.0 Beta and my perl client is "Test-WWW-Selenium-1.15". Can you please help me how to get this command working?
Thanks in advance
Shashi
Shashi,
Your usage looks correct. I think you just need to upgrade your client driver version. Try using one of the nightly builds. Good luck!
Haw-Bin
Hello Haw-Bin,
Thanks for your reply, i downloaded today's nightly build and tried to run the test case i still get the folloing error
Can't locate object method "capture_entire_page_screenshot" via package "Test::WWW::Selenium" (also tried "WWW::Selenium) at C:/perlapache/Perl/lib/Test/WWW/Selenium.pm line 144
How to solve this issue? Please help I'm stuck...
Thanks in advance
Shashi
Hi,
Did you install the updated Perl modules from the bundle as outlined here: http://selenium-rc.openqa.org/perl.html ?
Haw-Bin
Hello Haw-Bin,
Yes i did install, below is the console output..
C:\Software\selenium-remote-control-1.0\selenium-perl-client-driver-1.0>perl Makefile.PL
*** Module::AutoInstall version 1.02
*** Checking for Perl dependencies...
[Core Features]
- Test::More ...loaded. (0.8 >= 0.42)
- Test::Exception ...loaded. (0.21)
- Test::Mock::LWP ...loaded. (0.05)
- Test::Pod ...loaded. (1.26)
- URI::Escape ...loaded. (3.28 >= 1.31)
*** Module::AutoInstall configuration finished.
Writing Makefile for Test::WWW::Selenium
C:\Software\selenium-remote-control-1.0\selenium-perl-client-driver-1.0>nmake install
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
cp lib/WWW/Selenium.pm blib\lib\WWW\Selenium.pm
cp lib/Test/WWW/Selenium.pm blib\lib\Test\WWW\Selenium.pm
cp lib/WWW/Selenium/Util.pm blib\lib\WWW\Selenium\Util.pm
Installing C:\perlapache\Perl\site\lib\Test\WWW\Selenium.pm
Installing C:\perlapache\Perl\site\lib\WWW\Selenium.pm
Writing c:\perlapache\Perl\site\lib\auto\Test\WWW\Selenium\.packlist
Appending installation info to c:\perlapache\Perl\lib/perllocal.pod
But still i get that error Can't locate object method "capture_entire_page_screenshot" via package "Test::WWW::Selenium" (also tried "WWW::Selenium) at C:/perlapache/Perl/lib/Test/WWW/Selenium.pm line 144
Is there any other steps i need to carry out? or did i install the module correctly?
Thanks in advance
Shashi
I think the old version of the driver must appear earlier in your module path than the new one, so you're still using the version that doesn't support the command.
I just verified for myself that the command is working. I built the Perl client driver, installed with nmake, recorded a simple test with the IDE, exported as Perl, and then ran the test. The screenshot was created successfully. Here's my test for reference (although it doesn't sound like the test is your problem):
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;
my $sel = Test::WWW::Selenium->new( host => "localhost",
port => 4040,
browser => "*chrome",
browser_url => "http://www.google.com/" );
$sel->open_ok("/");
$sel->type_ok("q", "yoo");
$sel->click_ok("btnG");
$sel->wait_for_page_to_load_ok("60000");
$sel->capture_entire_page_screenshot_ok("D:\\work\\temp\\yoo.png", "");
Check your @INC. Looks like the new driver was installed under C:\perlapache ... mine was installed under C:\Perl (ActivePerl).
Haw-Bin
