Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Using xpath value in selenium web driver in perl

by Anonymous Monk
on May 14, 2013 at 07:29 UTC ( #1033432=note: print w/replies, xml ) Need Help??


in reply to Using xpath value in selenium web driver in perl

What does find_element() return?

What is  $elem and where does it come from?

Replies are listed 'Best First'.
Re^2: Using xpath value in selenium web driver in perl
by Shaveta_Chawla (Sexton) on May 14, 2013 at 07:36 UTC
    The complete code is as follows:
    use Selenium::Remote::Driver; my $driver = new Selenium::Remote::Driver(); $driver->get('some url'); $driver->find_element("//input[\@name='login']")->send_keys('username' +); $driver->find_element("//input[\@name='password']")->send_keys('passwo +rd'); my $elem = $driver->find_element("//input[\@id='GoAheadAndLogIn']"); $driver->mouse_move_to_location(element => $elem, xoffset => 0, yoffse +t => 0); $driver->click;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033432]
help
Chatterbox?
[james28909]: james28909... failer of the chatterbox
[james28909]: Mojolicious
[james28909]: map
[james28909]: grep
[james28909]: :D

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2017-05-24 23:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?