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

WWW::Selenium terminates program on object not found - not expected -Expects something like try- catch in java

by Selva123 (Novice)
on Jun 26, 2010 at 19:33 UTC ( [id://846712]=perlquestion: print w/replies, xml ) Need Help??

Selva123 has asked for the wisdom of the Perl Monks concerning the following question:

Hello PerlMonks,

I am automating testcases with Selenium RC and PERL using WWW::Selenium. Whenever the object not found, the perl script exits/terminates execution with message as "Looks like your test exited with 255 before it could output anything.."

I did not expect this behavior, instead it should show some error in command prompt/log and should proceed further.

Is there any process to make the PERL /Selenium to work like this, such as try -(Statement execution ) catch () {} as in JAVA.

Thx Selva D
  • Comment on WWW::Selenium terminates program on object not found - not expected -Expects something like try- catch in java

Replies are listed 'Best First'.
Re: WWW::Selenium terminates program on object not found - not expected -Expects something like try- catch in java
by moritz (Cardinal) on Jun 26, 2010 at 19:47 UTC
    try is spelled eval in Perl 5.
    Perl 6 - links to (nearly) everything that is Perl 6.
Re: WWW::Selenium terminates program on object not found - not expected -Expects something like try- catch in java
by nikosv (Deacon) on Jun 27, 2010 at 08:01 UTC
    Perl has eval as its built in exception handling facility but there are modules like Error.pm that provide a SEH extension to Perl.

    However Error.pm is depracated and should look for other modules like maybe TryCatch

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-23 13:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found