1. I have just started learning Selenium IDE, RC and Perl script. I created a simple test case in Selenium IDE that completes to the end without any errors, when I set the Speed Control to Slow.

2. I Formatted the HTML to Perl and saved the file as (.pl) and compiled the program.

3. Selenium RC server reports back the Error:

09:24:10.538 INFO - Got result: ERROR: Element link=SQAForums not found on session b98fb731fd034f358dc7d7550ae7fd15

4. The command prompt reports back the Error:

# Error requesting http://localhost:4444/selenium-server/driver/: # ERROR: Element link=SQAForums not found not ok 8 - click, link=SQAForums, # Failed test 'click, link=SQAForums, ' # at sqaforms2.pl line 22.

I think this has something do with the speed\moving forward before it get the Element.

Can anyone help me to fix this error. I have researched this and only found a possible solution for Java Script.

Code:

use strict; use warnings; use Time::HiRes qw(sleep); use Test::WWW::Selenium; use Test::More "no_plan"; use Test::Exception; my $where_firefox_lives = "C:\\Program Files (x86)\\Mozilla Firefox\\f +irefox.exe"; my $sel = Test::WWW::Selenium->new( host => "localhost", port => 4444, browser => "*firefox $where_firefo +x_lives", browser_url => "http://www.sqaforu +ms.com" ); $sel->open_ok("/logout.php"); $sel->click_ok("link=Login"); $sel->wait_for_page_to_load_ok("30000"); $sel->type_ok("Loginname", "patrickee"); $sel->type_ok("Loginpass", "leeee1"); $sel->click_ok("buttlogin"); $sel->wait_for_page_to_load_ok("30000"); $sel->click_ok("link=SQAForums", ""); $sel->wait_for_page_to_load_ok("30000"); $sel->click_ok("link=Logout"); $sel->wait_for_page_to_load_ok("30000"); $sel->click_ok("ss0");

In reply to Selenium RC Perl Error: Element not found by patricklee

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.