Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Using Test::WWW::Selenium and Selenium::Remote::Driver together

by nubbel (Novice)
on Jul 17, 2013 at 13:17 UTC ( #1044803=perlquestion: print w/ replies, xml ) Need Help??
nubbel has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

i try to enhance a Selenium-Perl-Script which i've recorded with the Selenium IDE.
use strict; use warnings; use Time::HiRes qw(sleep); use Test::WWW::Selenium; use Test::More "no_plan"; use Test::Exception; use Data::Dumper; use Selenium::Remote::Driver; my $sel = Test::WWW::Selenium->new( host => "localhost", port => 4444, browser => "*chrome", browser_url => "http://192.168.1.2 +/" ); $sel->open_ok("/portfolio/"); $sel->window_maximize(); $sel->title_like(qr/Catalog/); my @elements = $sel->find_elements('//*'); print Dumper @elements; $sel->quit();
When i run it i get folowing error: "Can't locate object method "find_elements" via package "Test::WWW::Selenium" (also tried "WWW::Selenium") at 1.pl line 20".
I know find_elements is part of Selenium::Remote::Driver, therfore i included the "user Selenium::Remote::Driver" line to the script, but that's not working. Can you please tell me how to use Selenium::Remote::Driver and Test::WWW::Selenium together in one script?

THX

Nubbel

Comment on Using Test::WWW::Selenium and Selenium::Remote::Driver together
Download Code
Re: Using Test::WWW::Selenium and Selenium::Remote::Driver together
by daxim (Chaplain) on Jul 17, 2013 at 13:43 UTC
    You can't. The testicular version of Selenium::Remote::Driver is called Test::WebDriver. However, all it gives you is a bit of syntactic sugar.

    Plain Test::More in conjunction with Selenium::Remote::Driver works just fine.

      Thx!

      Living without suggar is supposed be more healty ;-) But don't we all like candy (IDE)?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1044803]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2014-08-31 00:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls