Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: selenium: saving text and reg exp

by spq (Friar)
on Dec 18, 2009 at 16:04 UTC ( #813387=note: print w/replies, xml ) Need Help??


in reply to selenium: saving text and reg exp

There is a selenium command for almost anything you want to do in testing a web page. For example, using the IDE you will find a number of store commands, such as storeText. I have found that frequently the fastest way to find out how to do something with a selenium test in Perl (my experience with Selenium is almost all front end through the IDE) is to add an appropriate command in the IDE and then export to Perl to see the syntax used.

So, for storeText I found the example boiled down to:

my $text = $sel->get_text("//xpath");

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://813387]
help
Chatterbox?
[marto]: good morning all
[Corion]: Hi marto! ;)
[Discipulus]: morning both!
[Corion]: Hi Discipulus!
[Corion]: My pictures from the vacation are now online ;)
[Discipulus]: welcome back Aristotle!

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2017-02-27 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (378 votes). Check out past polls.