How to auto submit a jsp page after loading

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to auto submit a jsp page after loading

albert kao-2
How to auto submit a jsp page after loading is done?
i.e. after a jsp page is completely loading, it will auto submit - advance
to the next page without one of the Submit buttons is pressed or a link is
clicked.
This is desired for saving time when testing a web application.
Reply | Threaded
Open this post in threaded view
|

Re: How to auto submit a jsp page after loading

Lukasz Lenart
czw., 3 paź 2019 o 13:57 albert kao <[hidden email]> napisał(a):
>
> How to auto submit a jsp page after loading is done?
> i.e. after a jsp page is completely loading, it will auto submit - advance
> to the next page without one of the Submit buttons is pressed or a link is
> clicked.
> This is desired for saving time when testing a web application.

The only option is to use JavaScript IMO


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to auto submit a jsp page after loading

Dave Newton-6
In reply to this post by albert kao-2
On Thu, Oct 3, 2019 at 7:57 AM albert kao <[hidden email]> wrote:

> This is desired for saving time when testing a web application.
>

Two points:

* You'd no longer be testing the page.
* You'd introduce *additional* functionality not present on the real page.

Dave
Reply | Threaded
Open this post in threaded view
|

RE: How to auto submit a jsp page after loading

Rouse, Ed
In reply to this post by Lukasz Lenart


From: Lukasz Lenart <[hidden email]>
Sent: Thursday, October 3, 2019 8:27 AM
To: Struts Users Mailing List <[hidden email]>
Subject: Re: How to auto submit a jsp page after loading

[External email: Use caution! Do not open attachments or click on links from unknown senders or unexpected emails.]
czw., 3 paź 2019 o 13:57 albert kao <[hidden email]<mailto:[hidden email]>> napisał(a):
>
> How to auto submit a jsp page after loading is done?
> i.e. after a jsp page is completely loading, it will auto submit - advance
> to the next page without one of the Submit buttons is pressed or a link is
> clicked.
> This is desired for saving time when testing a web application.

The only option is to use JavaScript IMO


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/<https://protect-us.mimecast.com/s/-teZCERGVvu37PkOtwzWbJ?domain=lenart.org.pl>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]<mailto:[hidden email]>
For additional commands, e-mail: [hidden email]<mailto:[hidden email]>




Call the submit script from the page onload event.
Reply | Threaded
Open this post in threaded view
|

RE: How to auto submit a jsp page after loading

Anurag Singh {अनुराग सिंह}
In reply to this post by albert kao-2
Can use Javascript to achieve it. Sample code as follows

<form id = "frm" name ="frm" action = "relevantaction" method="POST" >
-------
------
</form>

<script>
    window.onload = function() {
        document.getElementById("frm").submit();
    }

</script>

-----Original Message-----
From: albert kao [mailto:[hidden email]]
Sent: Thursday, October 03, 2019 17:19
To: Struts Users Mailing List
Subject: How to auto submit a jsp page after loading

How to auto submit a jsp page after loading is done?
i.e. after a jsp page is completely loading, it will auto submit - advance
to the next page without one of the Submit buttons is pressed or a link is
clicked.
This is desired for saving time when testing a web application.
________________________________

दावात्याग : यह ईमेल पावरग्रिड के दावात्याग नियम व शर्तों द्वारा शासित है जिसे http://apps.powergridindia.com/Disclaimer.htm पर देखा जा सकता है।
Disclaimer: This e-mail is governed by the Disclaimer Terms & Conditions of POWERGRID which may be viewed at http://apps.powergridindia.com/Disclaimer.htm

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: How to auto submit a jsp page after loading

Yasser Zamani-2
In reply to this post by Dave Newton-6
Hi Albert,

I think Dave is right -- if you wanted to test, then you would not do this.

What have you been using for test? If it tested UI also (e.g. Selenium),
it would have facilities to automate clicking on submit button [1]. If
you didn't want to test UI at all (e.g. JMeter), you would not try to
execute client side codes -- just call action via http, validate and
process result and repeat respectively.

Hope this helps!

Regards.

[1] https://pythonspot.com/selenium-click-button/

On 10/3/2019 4:03 PM, Dave Newton wrote:

> On Thu, Oct 3, 2019 at 7:57 AM albert kao <[hidden email]> wrote:
>
>> This is desired for saving time when testing a web application.
>>
>
> Two points:
>
> * You'd no longer be testing the page.
> * You'd introduce *additional* functionality not present on the real page.
>
> Dave
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]