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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|