Thread: [Http-webtest-general] trying to test button
Brought to you by:
m_ilya,
richardanderson
From: David M. <dmc...@la...> - 2004-06-02 00:58:50
|
Greetings, I'm new to WebTest and I've been playing with it for a couple of days with some success. I've run into a problem, though. I have a login form to which I want to submit data (i.e., "user_id", "password"). The form begins as follows: <form name="loginForm" id="loginForm" method="POST"> <input type="hidden" name="form" value="do_log_in"> The form has a button generated as follows: <tr> <td colspan="2" align="right"> <img src="../images/btn_log_in.gif" style="cursor:pointer;cursor:hand" onclick="submit()"); </td> </tr> I've been trying to use the ::Click methods to operate the button without success. Can someone tell me what I need to do to operate the button? Thanks. v/r - David |
From: Srdjan <sr...@ca...> - 2004-06-02 02:01:11
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 That's not button at all - just a clickable image. Considering that clicking the image does nothing but submit, you don't need to use ::Click methods at all - just a plain POST request with params. Srdjan David McBride wrote: | Greetings, | | | | I’m new to WebTest and I’ve been playing with it for a couple of days | with some success. I’ve run into a problem, though. I have a login | form to which I want to submit data (i.e., “user_id”, “password”). The | form begins as follows: | | | | <form name="loginForm" id="loginForm" method="POST"> | | <input type="hidden" name="form" value="do_log_in"> | | | | | | The form has a button generated as follows: | | | | <tr> | | <td colspan="2" align="right"> | | <img src="../images/btn_log_in.gif" | style="cursor:pointer;cursor:hand" onclick="submit()"); | | </td> | | </tr> | | | | I’ve been trying to use the ::Click methods to operate the button | without success. Can someone tell me what I need to do to operate the | button? Thanks. | | | | v/r | | | | - David | | | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAvTTcZtcHxCitRpgRAhcxAJ4nJDfTGpjE6ADJBvIdRTAb1mnacwCgpLtC HfLkk35G/3wiVKJXNFF0Fi8= =60PM -----END PGP SIGNATURE----- |
From: David M. <dmc...@la...> - 2004-06-02 03:01:29
|
Thanks for replying. The parameters won=B9t be processed if the submit() function doesn=B9t run and the submit() function won=B9t operate unless the image is clicked. So, I=B9m still stuck with trying to click the image. - David on 6/1/04 7:01 PM, Srdjan at sr...@ca... wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > That's not button at all - just a clickable image. Considering that click= ing > the > image does nothing but submit, you don't need to use ::Click methods at a= ll - > just a plain POST request with params. >=20 > Srdjan >=20 > David McBride wrote: > | Greetings, > | > | > | > | I=B9m new to WebTest and I=B9ve been playing with it for a couple of days > | with some success. I=B9ve run into a problem, though. I have a login > | form to which I want to submit data (i.e., =B3user_id=B2, =B3password=B2). The > | form begins as follows: > | > | > | > | <form name=3D"loginForm" id=3D"loginForm" method=3D"POST"> > | > | <input type=3D"hidden" name=3D"form" value=3D"do_log_in"> > | > | > | > | > | > | The form has a button generated as follows: > | > | > | > | <tr> > | > | <td colspan=3D"2" align=3D"right"> > | > | <img src=3D"../images/btn_log_in.gif" > | style=3D"cursor:pointer;cursor:hand" onclick=3D"submit()"); > | > | </td> > | > | </tr> > | > | > | > | I=B9ve been trying to use the ::Click methods to operate the button > | without success. Can someone tell me what I need to do to operate the > | button? Thanks. > | > | > | > | v/r > | > | > | > | - David > | > | > | > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org >=20 > iD8DBQFAvTTcZtcHxCitRpgRAhcxAJ4nJDfTGpjE6ADJBvIdRTAb1mnacwCgpLtC > HfLkk35G/3wiVKJXNFF0Fi8=3D > =3D60PM > -----END PGP SIGNATURE----- >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the one > installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Http-webtest-general mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/http-webtest-general >=20 |
From: Raghavendra H. <rag...@te...> - 2004-06-02 04:42:32
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> <pre>submit() performs either GET or POST method on the formhandler, You can directly call the webtest with proper method. My webpage also uses the clickable images, but i am able to use as below. $webtest->run_tests( { test_name =>'Logggin in ..', url => $URL."goform/formValidate", method => GET, params => [ username => "$username", password => "$password" ] }, { terse => 'failed_only', ignore_case => 'yes', text_forbid => [ 'Premature end of script headers', 'Error processing directive' ] } ); Thanks Raghavendra </pre> <br> David McBride wrote:<br> <blockquote type="cite" cite="midBCE29097.A7D8%25d...@la..."> <title>Re: [Http-webtest-general] trying to test button</title> <font face="Verdana"><span style="font-size: 12px;">Thanks for replying.<br> <br> The parameters won’t be processed if the submit() function doesn’t run and the submit() function won’t operate unless the image is clicked. <br> <br> So, I’m still stuck with trying to click the image. <br> <br> - David<br> <br> on 6/1/04 7:01 PM, Srdjan at <a class="moz-txt-link-abbreviated" href="mailto:sr...@ca...">sr...@ca...</a> wrote:<br> <br> </span></font> <blockquote><font face="Monaco"><span style="font-size: 14px;"><tt>-----BEGIN PGP SIGNED MESSAGE-----<br> Hash: SHA1<br> <br> That's not button at all - just a clickable image. Considering that clicking the<br> image does nothing but submit, you don't need to use ::Click methods at all -<br> just a plain POST request with params.<br> <br> Srdjan<br> <br> David McBride wrote:<br> | Greetings,<br> |<br> |<br> |<br> | I’m new to WebTest and I’ve been playing with it for a couple of days<br> | with some success. I’ve run into a problem, though. I have a login<br> | form to which I want to submit data (i.e., “user_id”, “password”). The<br> | form begins as follows:<br> |<br> |<br> |<br> | <form name="loginForm" id="loginForm" method="POST"><br> |<br> | <input type="hidden" name="form" value="do_log_in"><br> |<br> |<br> |<br> |<br> |<br> | The form has a button generated as follows:<br> |<br> |<br> |<br> | <tr><br> |<br> | <td colspan="2" align="right"><br> |<br> | <img src="../images/btn_log_in.gif"<br> | style="cursor:pointer;cursor:hand" onclick="submit()");<br> |<br> | </td><br> |<br> | </tr><br> |<br> |<br> |<br> | I’ve been trying to use the ::Click methods to operate the button<br> | without success. Can someone tell me what I need to do to operate the<br> | button? Thanks.<br> |<br> |<br> |<br> | v/r<br> |<br> |<br> |<br> | - David<br> |<br> |<br> |<br> -----BEGIN PGP SIGNATURE-----<br> Version: GnuPG v1.2.4 (GNU/Linux)<br> Comment: Using GnuPG with Thunderbird - <a href="http://enigmail.mozdev.org">http://enigmail.mozdev.org</a><br> <br> iD8DBQFAvTTcZtcHxCitRpgRAhcxAJ4nJDfTGpjE6ADJBvIdRTAb1mnacwCgpLtC<br> HfLkk35G/3wiVKJXNFF0Fi8=<br> =60PM<br> -----END PGP SIGNATURE-----<br> <br> <br> -------------------------------------------------------<br> This SF.Net email is sponsored by the new InstallShield X.<br> >From Windows to Linux, servers to mobile, InstallShield X is the one<br> installation-authoring solution that does it all. Learn more and<br> evaluate today! <a href="http://www.installshield.com/Dev2Dev/0504">http://www.installshield.com/Dev2Dev/0504</a><br> _______________________________________________<br> Http-webtest-general mailing list<br> <a class="moz-txt-link-abbreviated" href="mailto:Htt...@li...">Htt...@li...</a><br> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/http-webtest-general">https://lists.sourceforge.net/lists/listinfo/http-webtest-general</a><br> <br> </tt></span></font></blockquote> <font face="Monaco"><span style="font-size: 14px;"><tt><br> </tt></span></font> </blockquote> <br> <pre class="moz-signature" cols="72">-- Raghavendra Hegde Teneoris Networks, Bangalore </pre> </body> </html> |
From: Srdjan <sr...@ca...> - 2004-06-02 07:05:24
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Then you're out of luck. I mean if you're depending on JavaScript to do whatever in the on_submit() handler. I know of no non-browser user agent that does JavaScript. But you should still be able to "know" what would be the result of clicking the button in terms of setting the form field values, and set them yourself. Srdjan David McBride wrote: | Thanks for replying. | | The parameters won’t be processed if the submit() function doesn’t run | and the submit() function won’t operate unless the image is clicked. | | So, I’m still stuck with trying to click the image. | | - David | | on 6/1/04 7:01 PM, Srdjan at sr...@ca... wrote: | | That's not button at all - just a clickable image. Considering that | clicking the | image does nothing but submit, you don't need to use ::Click methods | at all - | just a plain POST request with params. | | Srdjan | | David McBride wrote: | | Greetings, | | | | | | | | Im new to WebTest and Ive been playing with it for a couple of days | | with some success. Ive run into a problem, though. I have a login | | form to which I want to submit data (i.e., user_id, password). | The | | form begins as follows: | | | | | | | | <form name="loginForm" id="loginForm" method="POST"> | | | | <input type="hidden" name="form" value="do_log_in"> | | | | | | | | | | | | The form has a button generated as follows: | | | | | | | | <tr> | | | | <td colspan="2" align="right"> | | | | <img src="../images/btn_log_in.gif" | | style="cursor:pointer;cursor:hand" onclick="submit()"); | | | | </td> | | | | </tr> | | | | | | | | Ive been trying to use the ::Click methods to operate the button | | without success. Can someone tell me what I need to do to operate the | | button? Thanks. | | | | | | | | v/r | | | | | | | | - David | | | | | | - ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. |>From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Http-webtest-general mailing list Htt...@li... https://lists.sourceforge.net/lists/listinfo/http-webtest-general -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAvXwnZtcHxCitRpgRAkxdAJ9XNIaT7P5qLP4e5+khMXva8jRiVQCfXa61 aqReRstkCgj7ACw9v9yn/oY= =bbrO -----END PGP SIGNATURE----- |
From: David M. <dmc...@la...> - 2004-06-02 20:45:11
|
Finally got it! You were right, no need to click anything: test_name =3D Submit wrong username & password url =3D http://localhost/lw/ara/lwcgi method =3D post params =3D ( form =3D> do_log_in user_id =3D> nobody password =3D> nobody ) text_require =3D ( Invalid User ID User ID: Password:) text_forbid =3D ( In order to continue you must log in first )=20 end_test Thanks for your help ;-) - David -----Original Message----- From: htt...@li... [mailto:htt...@li...] On Behalf Of Srdjan Sent: Tuesday, June 01, 2004 6:01 PM To: David McBride Cc: htt...@li... Subject: Re: [Http-webtest-general] trying to test button -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 That's not button at all - just a clickable image. Considering that = clicking the image does nothing but submit, you don't need to use ::Click methods at = all - just a plain POST request with params. Srdjan David McBride wrote: | Greetings, | | | | I'm new to WebTest and I've been playing with it for a couple of days | with some success. I've run into a problem, though. I have a login | form to which I want to submit data (i.e., "user_id", "password"). = The | form begins as follows: | | | | <form name=3D"loginForm" id=3D"loginForm" method=3D"POST"> | | <input type=3D"hidden" name=3D"form" value=3D"do_log_in"> | | | | | | The form has a button generated as follows: | | | | <tr> | | <td colspan=3D"2" align=3D"right"> | | <img src=3D"../images/btn_log_in.gif" | style=3D"cursor:pointer;cursor:hand" onclick=3D"submit()"); | | </td> | | </tr> | | | | I've been trying to use the ::Click methods to operate the button | without success. Can someone tell me what I need to do to operate the | button? Thanks. | | | | v/r | | | | - David | | | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAvTTcZtcHxCitRpgRAhcxAJ4nJDfTGpjE6ADJBvIdRTAb1mnacwCgpLtC HfLkk35G/3wiVKJXNFF0Fi8=3D =3D60PM -----END PGP SIGNATURE----- ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Http-webtest-general mailing list Htt...@li... https://lists.sourceforge.net/lists/listinfo/http-webtest-general |