Hi, again

To ensure quality of the software i write, i use WWW::Mechanize and httpunit for automated testing.
The problem i face however, is that i use httpunit for the site that handles JavaScript, and WWW::Mechanize for plain simple html-pages. (i like the last since it's perl, and i'm not fond of java.)

However, both methods give me problems for not or bad coping with JavaScript, eg. resetTimeOut functions are not supported.

Right now i'm trying to find the solution to automate my front-end testing, that supports JavaScript.

Please tell me there is a (simple) solution that might help me, i'm sure others have to deal with it as well.
Thanks

*update* ps. anyone have experience with wtr ?
// Example code that gives problems in httpunit, i would not know of a + way in perl or any other method... import com.meterware.httpunit.*; import junit.framework.*; public class Ced extends TestCase{ public static void main( String[] params ) { try { // create the conversation object which will maintain stat +e for us WebConversation wc = new WebConversation(); // Obtain the main page on the web site WebRequest request = new GetMethodWebRequest( "http://www. +site.com/cgi-bin/script.pl/12" ); WebResponse response = wc.getResponse( request ); // Print the pagesource if needed. // System.out.println( response.getText() ); // Insert form data WebForm form = response.getFormWithName("LoginForm"); assertNotNull( "No form found with name 'LoginForm'", form + ); form.setParameter("userid", "username"); form.setParameter("password","secret"); // Submit the data WebLink loginbutton = response.getFirstMatchingLink( WebLi +nk.MATCH_CONTAINED_TEXT, "Log in"); response = loginbutton.click(); } catch (Exception e) { System.err.println( "Exception: " + e ); } } } // This generates errors like: Event 'top.ResetTimeOut();' failed: Typ +eError: clearTimeout is not a function.
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

In reply to Automated testing driving me nuts... by jbrugger

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.