Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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

In reply to Using Test::WWW::Selenium and Selenium::Remote::Driver together by nubbel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-19 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found