jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: Navigation via onload javascript function
Date Wed, 10 Nov 2004 19:01:57 GMT
On Wed, 10 Nov 2004 09:28:51 -0500, Tom Purcell
<> wrote:
> Hello,
>         I'm having a problem running a test on an application. Things work
> fine until the test gets to a HTTPRequest for a page that the user does
> not see. On this page there is an "onload" in the body tag that calls a
> javascript function called doPost(). That function does exactly that: a
> post to an ASP on another server. It appears that Jmeter does not execute
> this javascript. This results in all subsequent steps in the test to fail
> because the initial link to the other server is not established.
>         My first question is should Jmeter be executing the script? If not

JMeter does not execute Java scripts embedded in HTML pages

> is there a way to get it to execute the script or is there some work


> around. Partial source is below:

Yes, create a sampler with the appropriate URL and parameters that
would have been performed by the javascript.

As it's HTTPS you won't be able to use the Proxy to record it.

But in this case it looks to be fairly simple (if tedious) to pick out
the URL and all the parameters.

> html lang="en">
> <head>
> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
> </head>
> <body onload="postform()">
> <script language="JavaScript">
> function postform()
> {
>         document.forms[0].submit();
> }
> </script>
> <form method="post" action="">
>         <input type="hidden" name="...
> </form>
> </body>
> </html>
> Thanks,
> Tom
> NOTICE:  This communication may contain confidential, proprietary or
> legally privileged information. It is intended only for the person(s) to
> whom it is addressed.  If you are not an intended recipient, you may not
> use, read, retransmit, disseminate or take any action in reliance upon it.
> Please notify the sender that you have received it in error and
> immediately delete the entire communication, including any attachments.
> Towers Perrin does not encrypt and cannot ensure the confidentiality or
> integrity of external e-mail communications and, therefore, cannot be
> responsible for any unauthorized access, disclosure, use or tampering that
> may occur during transmission.  This communication is not intended to
> create or modify any obligation, contract or warranty of Towers Perrin,
> unless the firm clearly expresses such an intent.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message