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

by boojeboy (Novice)
on Jan 11, 2008 at 21:01 UTC ( #661986=perlquestion: print w/ replies, xml ) Need Help??
boojeboy has asked for the wisdom of the Perl Monks concerning the following question:

'testComplete' command evaluates function which has no string value
firefox , osx , mac Reply
mac osx, firefox error
I'm passing string
to the get_attribute,is_element_present_ok functions
but when the test is complete, the functions are evaluated but have no string passed so I get the '500 Can't call method "FETCH" on an undefined value' error.
This is not the "firefox-bin" issue as the scripts run fine if each function has an explicit string value.
Are we only supposed to call functions with an explicit string value?
sample code:
getElementStatus("combo_item_1","combo_header\@class"); sub getElementStatus{ my ($element, $attribute_tested ) = @_; WAIT: { for (1..60) { if (eval {$sel->is_element_present_ok($element)}) { pass; last WAIT } sleep(1); } fail("timeout"); } my $status = $sel->get_attribute($attribute_tested); return $status; }

Comment on "testComplete"
Download Code
Replies are listed 'Best First'.
Re: "testComplete"
by fenLisesi (Priest) on Jan 12, 2008 at 12:57 UTC

    Your post is difficult to read. That will place an unnecessary hurdle in front of monks who will be trying to help you. Please study Writeup Formatting Tips. In particular, avoiding <br /> tags and making use of <code>...</code> tags should make an immediate impact.

    There are users of Selenium IDE here, so you should be getting help soon. In the meantime, it would be great if you updated your node with better formatting. Cheers.

      At the end of the script:
      # Garbage collection, destroy the created object $sel->DESTROY;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://661986]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2015-12-01 16:18 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (18 votes), past polls