8 Replies Last post: Oct 3, 2008 11:42 AM by Haw-Bin Chai  
Shashi Beginner 30 posts since
Jul 17, 2008
Currently Being Moderated

Sep 24, 2008 5:29 AM

captureEntirePageScreenshot not working

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

Haw-Bin Chai Master 515 posts since
May 19, 2006
Currently Being Moderated
2. Sep 29, 2008 10:49 AM in response to: Shashi
Re: captureEntirePageScreenshot not working

I think it should be available to the Perl client driver in subversion. What version are you using?

 

 

 

Haw-Bin

 

Haw-Bin Chai Master 515 posts since
May 19, 2006
Currently Being Moderated
4. Oct 1, 2008 11:09 AM in response to: Shashi
Re: captureEntirePageScreenshot not working

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

Haw-Bin Chai Master 515 posts since
May 19, 2006
Currently Being Moderated
6. Oct 2, 2008 9:49 AM in response to: Shashi
Re: captureEntirePageScreenshot not working

Hi,

 

Did you install the updated Perl modules from the bundle as outlined here:  http://selenium-rc.openqa.org/perl.html  ?

 

 

 

Haw-Bin

Haw-Bin Chai Master 515 posts since
May 19, 2006
Currently Being Moderated
8. Oct 3, 2008 11:42 AM in response to: Shashi
Re: captureEntirePageScreenshot not working

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

More Like This

  • Retrieving data ...