tclwebtest-general Mailing List for tclwebtest (Page 6)
Status: Abandoned
Brought to you by:
tils
This list is closed, nobody may subscribe to it.
2003 |
Jan
(31) |
Feb
(61) |
Mar
(34) |
Apr
(2) |
May
(3) |
Jun
(2) |
Jul
(11) |
Aug
(17) |
Sep
(8) |
Oct
(7) |
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2005 |
Jan
(2) |
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
(1) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-26 15:29:20
|
On Wed, Feb 26, 2003 at 10:13:37AM -0000, Harish wrote: > Hi there... > > I was trying to parse through the a few web pages trying to fill > in fields .. I encountered errors while filling up the following > form using tclwebtest: > > The errors were: > I was not able to check the radio button options. Without your source scripts there is nothing to do, I tried "log [form all]" and the result was: {index 5 value EMail name hathwayradio choices {{EMail eM} {Calendar u>C} {LogComplaint Lo} {Service u>S} {MailPanel u>M}} caption {} type radio stop_idx 887 start_idx 795 full {<input type="radio" value="EMail " name="hathwayradio" accesskey="a" class="BlueBG" checked>}} Which means the radio button is available to your script. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-26 15:21:17
|
On Wed, Feb 26, 2003 at 10:15:57AM -0000, Harish wrote: > I also had problem parsing thru the attached file. > The error reported was form not found.. > Can anybody help me out with these... The file you sent doesn't contain successful controls (http://www.w3.org/TR/html401/interact/forms.html#successful-controls), which are the only ones tclwebtest parses. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-26 14:43:48
|
On Wed, Feb 26, 2003 at 01:50:24PM +0000, Tilmann Singer wrote: > [link all] returns a list of links of the current page. [link > follow] tries to emulate clicking on a link on the current page, > and changes the current page, as you can see by the "--- do_request > for" output in your log. Thus the subsequent [link follow] calls > fail because you are trying to follow a link that is not present > on the resulting current page. > > To go through a list of links, use [do_request] instead of > [link follow]. Another solution I used in a similar script was to cache the result of [link all] in a variable and read instead in subsequent do_request calls. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Tilmann S. <ti...@ti...> - 2003-02-26 13:53:22
|
* a....@12... <a....@12...> [20030226 13:46]: > Sorry, If you get this message for the second time. > I just subscribed to the list and I don't know if subscribing is necessary > to post (and will the forumlist remain 'read only'?) Yes it was sent over the list already, and I replied to it (reply below). So it seems subscribing is not necessary to post. What do you mean by "will the forumlist remain 'read only'"? cheers, Til ------ From: Tilmann Singer <ti...@ti...> To: tcl...@li... Date: Wed, 26 Feb 2003 10:00:44 +0000 * a....@12... <a....@12...> [20030226 09:23]: > I'm workin on a simpel tclwebtest-UI for OpenACS. Cool - in Tk? > While running a script a get a weird error. > Some links are resolved some are not in the script below. > I have put a debug statement in lib/tclwebtest.tcl to see what happens (see > below) > Does anybody know what the result means? > Any help or pointers are appreciated. > debug "Number of Links of This Page: [llength [link all]]" > foreach link [link all] { > array set aLink $link > debug "\* $aLink(full)" > if { [catch { link follow ~u $aLink(url) } err] } { > debug "we got an error: $err" > } > } [link all] returns a list of links of the current page. [link follow] tries to emulate clicking on a link on the current page, and changes the current page, as you can see by the "--- do_request for" output in your log. Thus the subsequent [link follow] calls fail because you are trying to follow a link that is not present on the resulting current page. To go through a list of links, use [do_request] instead of [link follow]. |
From: <a....@12...> - 2003-02-26 13:44:54
|
Sorry, If you get this message for the second time. I just subscribed to the list and I don't know if subscribing is necessary to post (and will the forumlist remain 'read only'?) My problem may be related to the post of 24-2: 'HTML entities should be substituted in urls', but I didn't have time to look into that. Thanks Aldert Nooitgedagt -----Original Message----- From: a....@12... [mailto:a....@12...] Sent: woensdag 26 februari 2003 10:21 To: tcl...@li... Subject: link not found in ad_proc "find_in_array_list" Hi, I'm workin on a simpel tclwebtest-UI for OpenACS. I run tclwebtest in a tcl file with: set fp [open "|$TCLWEBTESTEXE $testfile_name" "r"] etcetera While running a script a get a weird error. Some links are resolved some are not in the script below. I have put a debug statement in lib/tclwebtest.tcl to see what happens (see below) Does anybody know what the result means? Any help or pointers are appreciated. Aldert Nooitgedagt ----begin script: run from webpage ---- do_request... ... debug "Number of Links of This Page: [llength [link all]]" foreach link [link all] { array set aLink $link debug "\* $aLink(full)" if { [catch { link follow ~u $aLink(url) } err] } { debug "we got an error: $err" } } ... ... ----end script---- ----change in lib/tclwebtest.tcl: just a Debug statement---- ad_proc find_in_array_list { ... ... # it is an expression - test the element at the current # index set element $a_item($key_to_search) debug "$element" ... ... ----end tclwebtest.tcl--- ----begin error: error <a href="/dotlrn/?&page%5fnum=1">Calendar</a> not found---- ... ... DEBUG: Number of Links of This Page: 45 DEBUG: * <a href="/"> <img class="header-img" border=0 src="/graphics/therapielogo.jpg" alt="Header Logo"></a> DEBUG: / --- do_request for http://valhalla/ http status: >>200<< DEBUG: * <a href="/dotlrn"><img class="header-img" border="0" src="/graphics/myspace-red.gif" width="98" height="25" alt="MySpace"></a> DEBUG: / DEBUG: /dotlrn --- do_request for http://valhalla/dotlrn http status: >>302<< following a redirect to: http://valhalla/dotlrn/ --- do_request for http://valhalla/dotlrn/ http status: >>200<< DEBUG: * <a href="/dotlrn/control-panel"><img class="header-img" border="0" src="/graphics/help-red.gif" width="67" height="25" alt="Help"></a> DEBUG: / DEBUG: /dotlrn DEBUG: /dotlrn/control-panel --- do_request for http://valhalla/dotlrn/control-panel http status: >>200<< DEBUG: * <a href="/register/logout"><img class="header-img" border="0" src="/graphics/logout-red.gif" width="62" height="25" alt="Logout"></a> DEBUG: / DEBUG: /dotlrn DEBUG: /dotlrn/control-panel DEBUG: /register/logout --- do_request for http://valhalla/register/logout http status: >>302<< following a redirect to: http://valhalla/ --- do_request for http://valhalla/ http status: >>200<< DEBUG: * <a href="/dotlrn/?&page%5fnum=1">Calendar</a> DEBUG: / DEBUG: /dotlrn DEBUG: /dotlrn/control-panel DEBUG: /register/ DEBUG: http://openacs.org/ DEBUG: http://openacs.org/bboard/q-and-a?topic_id=11 DEBUG: /doc/acs-templating/designer-guide.html DEBUG: http://openacs.org/software/ DEBUG: /admin/site-map/ DEBUG: /acs-admin/apm/ DEBUG: http://openacs.org/new-file-storage/ DEBUG: /acs-admin/ DEBUG: /admin/ DEBUG: /doc/ DEBUG: /api-doc/ DEBUG: http://openacs.org/bboard/ DEBUG: http://openacs.org/bboard/q-and-a?topic_id=11 DEBUG: http://openacs.org/ DEBUG: http://openacs.org/sdm/ DEBUG: /notifications/ DEBUG: /attachments/ DEBUG: /portal/ DEBUG: /developer/ DEBUG: register/explain-persistent-cookies DEBUG: /doc/ DEBUG: /api-doc/ DEBUG: /admin/site-map/ DEBUG: /acs-admin/apm/ DEBUG: /acs-admin/users/ DEBUG: /admin/groups/ DEBUG: /admin/ DEBUG: /acs-admin/ DEBUG: http://openacs.org/software/ DEBUG: http://openacs.org/ DEBUG: http://openacs.org/bboard/q-and-a?topic_id=11 DEBUG: http://openacs.org/bboard/ DEBUG: http://openacs.org/sdm/ DEBUG: http://dotlrn.openforce.net DEBUG: http://openacs.org DEBUG: we got an error: No link found that matches '~u /dotlrn/?&page%5fnum=1' .... .... ---------end error--------------------- |
From: Harish <on...@re...> - 2003-02-26 10:45:17
|
I also had problem parsing thru the attached file. The error reported was form not found.. Can anybody help me out with these... Truth needs to be repeated only as long as there are disbelievers- Max Mueler |
From: Harish <on...@re...> - 2003-02-26 10:16:29
|
Hi there... I was trying to parse through the a few web pages trying to fill in fields .. I encountered errors while filling up the following form using tclwebtest: <form method="post" name="radioform" onSubmit="return radiodecider()"> <input type="hidden" name="user"> <input type="hidden" name="password"> <input type="hidden" name="login"> <input type="hidden" name="usr_id"> <input type="hidden" name="pass"> <tr> <td colspan="2"><img src="images/hathway_service.gif" alt="HATHWAY SERVICES" width="348" height="16" border="0"></td> </tr> <tr> <td width="168" bgcolor="006699" class="WhiteTN" height="95" valign="middle"><input type="radio" value="EMail" name="hathwayradio" accesskey="a" class="BlueBG" checked>eM<u>a</u>il <input type="radio" value="Calendar" name="hathwayradio" accesskey="c" class="BlueBG"><u>C</u>alendar <br> <input type="radio" value="LogComplaint" name="hathwayradio" accesskey="g" class="BlueBG">Lo<u>g</u> a Complaint<br> <input type="radio" accesskey="s" value="Service" name="hathwayradio" class="BlueBG"><u>S</u>ervice Usage<br> <input type="radio" value="MailPanel" name="hathwayradio" accesskey="m" class="BlueBG"><u>M</u>ail Administration<br> <br> <b><font color="#FFFF00" size="2">Hathway Employees<br> </font><a href="http://webmail.hathway.net"><font size="1">Click Here for Webmail</font></a></b><br> </td> <td width="180" bgcolor="003366" align="right"> <table width="170" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="WhiteTN" width="90"><u>L</u>ogin ID</td><td class="WhiteTN"><u>P</u>assword</td></tr> <tr><td width="90"><input type="text" name="user1" accesskey="l" size="9" style="font-size:8pt"> </td><td><input type="password" name="password1" accesskey="p" size="9" style="font-size:8pt"> </td></tr><tr> <td width="90" class="WhiteTN">C<u>i</u>ty</td><td> </td> </tr><tr><td width="90"> <select accesskey="i" name="City" size="1" style="font-size:9pt"> <option selected value="City">Select a Location</option> <option value="mumbai">Mumbai</option> <option value="Chennai">Chennai</option> <option value="Pune">Pune</option> <option value="Delhi">Delhi</option> <option value="Bangalore">Bangalore</option> <option value="Hyderabad">Hyderabad</option> </select></td><td valign="middle"> <input type="submit" name="Submit" value="Login" style="font-size:9pt"></td> </tr> <tr><td width="90" colspan="2"> <br> <br> </td> </tr> </table> </td> </tr> <tr> <td colspan="2" height="1" bgcolor="000000"><img src="images/onepixel.gif" width="1" height="1"></td> </tr> <!-- <tr bgcolor="003366" valign="top" align="center"> <td colspan="2" height="1"> <table width="346" border="0" cellspacing="0" cellpadding="0" height="1" bgcolor="ffffff"> <tr> <td height="1" bgcolor="000000"><img src="images/onepixel.gif" width="1" height="1"></td> </tr> </table> </td> </tr> --> </form> The errors were: I was not able to check the radio button options. Truth needs to be repeated only as long as there are disbelievers- Max Mueler |
From: Tilmann S. <ti...@ti...> - 2003-02-26 10:03:32
|
* a....@12... <a....@12...> [20030226 09:23]: > I'm workin on a simpel tclwebtest-UI for OpenACS. Cool - in Tk? > While running a script a get a weird error. > Some links are resolved some are not in the script below. > I have put a debug statement in lib/tclwebtest.tcl to see what happens (see > below) > Does anybody know what the result means? > Any help or pointers are appreciated. > debug "Number of Links of This Page: [llength [link all]]" > foreach link [link all] { > array set aLink $link > debug "\* $aLink(full)" > if { [catch { link follow ~u $aLink(url) } err] } { > debug "we got an error: $err" > } > } [link all] returns a list of links of the current page. [link follow] tries to emulate clicking on a link on the current page, and changes the current page, as you can see by the "--- do_request for" output in your log. Thus the subsequent [link follow] calls fail because you are trying to follow a link that is not present on the resulting current page. To go through a list of links, use [do_request] instead of [link follow]. -- http://tsinger.com |
From: Harish <on...@re...> - 2003-02-26 10:02:35
|
The following are the urls that are giving the problems: www.hathway.com customercare.hathway.com The pages are also attached the mail. Truth needs to be repeated only as long as there are disbelievers- Max Mueler |
From: <a....@12...> - 2003-02-26 09:21:21
|
Hi, I'm workin on a simpel tclwebtest-UI for OpenACS. I run tclwebtest in a tcl file with: set fp [open "|$TCLWEBTESTEXE $testfile_name" "r"] etcetera While running a script a get a weird error. Some links are resolved some are not in the script below. I have put a debug statement in lib/tclwebtest.tcl to see what happens (see below) Does anybody know what the result means? Any help or pointers are appreciated. Aldert Nooitgedagt ----begin script: run from webpage ---- do_request... ... debug "Number of Links of This Page: [llength [link all]]" foreach link [link all] { array set aLink $link debug "\* $aLink(full)" if { [catch { link follow ~u $aLink(url) } err] } { debug "we got an error: $err" } } ... ... ----end script---- ----change in lib/tclwebtest.tcl: just a Debug statement---- ad_proc find_in_array_list { ... ... # it is an expression - test the element at the current # index set element $a_item($key_to_search) debug "$element" ... ... ----end tclwebtest.tcl--- ----begin error: error <a href="/dotlrn/?&page%5fnum=1">Calendar</a> not found---- ... ... DEBUG: Number of Links of This Page: 45 DEBUG: * <a href="/"> <img class="header-img" border=0 src="/graphics/therapielogo.jpg" alt="Header Logo"></a> DEBUG: / --- do_request for http://valhalla/ http status: >>200<< DEBUG: * <a href="/dotlrn"><img class="header-img" border="0" src="/graphics/myspace-red.gif" width="98" height="25" alt="MySpace"></a> DEBUG: / DEBUG: /dotlrn --- do_request for http://valhalla/dotlrn http status: >>302<< following a redirect to: http://valhalla/dotlrn/ --- do_request for http://valhalla/dotlrn/ http status: >>200<< DEBUG: * <a href="/dotlrn/control-panel"><img class="header-img" border="0" src="/graphics/help-red.gif" width="67" height="25" alt="Help"></a> DEBUG: / DEBUG: /dotlrn DEBUG: /dotlrn/control-panel --- do_request for http://valhalla/dotlrn/control-panel http status: >>200<< DEBUG: * <a href="/register/logout"><img class="header-img" border="0" src="/graphics/logout-red.gif" width="62" height="25" alt="Logout"></a> DEBUG: / DEBUG: /dotlrn DEBUG: /dotlrn/control-panel DEBUG: /register/logout --- do_request for http://valhalla/register/logout http status: >>302<< following a redirect to: http://valhalla/ --- do_request for http://valhalla/ http status: >>200<< DEBUG: * <a href="/dotlrn/?&page%5fnum=1">Calendar</a> DEBUG: / DEBUG: /dotlrn DEBUG: /dotlrn/control-panel DEBUG: /register/ DEBUG: http://openacs.org/ DEBUG: http://openacs.org/bboard/q-and-a?topic_id=11 DEBUG: /doc/acs-templating/designer-guide.html DEBUG: http://openacs.org/software/ DEBUG: /admin/site-map/ DEBUG: /acs-admin/apm/ DEBUG: http://openacs.org/new-file-storage/ DEBUG: /acs-admin/ DEBUG: /admin/ DEBUG: /doc/ DEBUG: /api-doc/ DEBUG: http://openacs.org/bboard/ DEBUG: http://openacs.org/bboard/q-and-a?topic_id=11 DEBUG: http://openacs.org/ DEBUG: http://openacs.org/sdm/ DEBUG: /notifications/ DEBUG: /attachments/ DEBUG: /portal/ DEBUG: /developer/ DEBUG: register/explain-persistent-cookies DEBUG: /doc/ DEBUG: /api-doc/ DEBUG: /admin/site-map/ DEBUG: /acs-admin/apm/ DEBUG: /acs-admin/users/ DEBUG: /admin/groups/ DEBUG: /admin/ DEBUG: /acs-admin/ DEBUG: http://openacs.org/software/ DEBUG: http://openacs.org/ DEBUG: http://openacs.org/bboard/q-and-a?topic_id=11 DEBUG: http://openacs.org/bboard/ DEBUG: http://openacs.org/sdm/ DEBUG: http://dotlrn.openforce.net DEBUG: http://openacs.org DEBUG: we got an error: No link found that matches '~u /dotlrn/?&page%5fnum=1' .... .... ---------end error--------------------- |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-25 15:28:03
|
On Tue, Feb 25, 2003 at 09:12:02AM +0000, Tilmann Singer wrote: > > http://validator.w3.org/docs/errors.html#bad-entity > > I don't find any information on this topic in this link, Well, the first list item states that using the character '&' inside an href is invalid HTML, and should be substituted with '&'. If you go to slashdot and take a look at the source, they use this '&' in their url, and the browser is meant to substitute '&' with '&' in the http request. Another explanation here: http://www.w3.org/TR/1998/REC-html40-19980424/appendix/notes.html#h-B.2.2 I've experimented explicitly using '&' in a manual http request, and slashdot still recognises this and parses correctly the parameter separator. However, this doesn't happen with our aolserver: if I request http://something?q=bla&t=bla, the server will answer that the parameter 't' wasn't found, probably because aolserver is detecting 'amp;t' as the next parameter. Without the '&' our pages are invalid HTML. With it (and without the commited patch) tclwebtest doesn't work on our servers. Maybe using translate_entities is overkill because only a few have to be replaced (IIRC >,< and &). > but shouldn't links be URL-encoded instead - e.g. " " becomes > %20 etc.? In my opinion this should be done automatically by > the tcl http package, but it isn't done - just checked it. It > is done automatically by a browser (checked it with Konqueror: > http://localhost:9000/Some Url/ becomes "GET /Some%20Url/ > HTTP/1.1"). AFAIK this is the standard escape sequence for ASCII characters below 33 and over 126, and it's an additional substitution tclwebtest could perform, though I still haven't been biten by this case. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Tilmann S. <ti...@ti...> - 2003-02-25 09:18:10
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030219 14:47]: > Huh... is it possible to double click a form submit button? Yes, if the reply to the POST request is taking some time, then the user will just see the form for some time, and some unexperienced users then click again, which some ambitious web programmers try to handle at least gracefully, e.g. making the server return a a nice error message. I think that would be a valuable addition to tclwebtest and will try to add it in the next few days. til -- http://tsinger.com |
From: Tilmann S. <ti...@ti...> - 2003-02-25 09:14:27
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030224 16:02]: > Commited the following patch, because HTML entities have to be substituted > by the user agent before doing the url request: > > http://validator.w3.org/docs/errors.html#bad-entity I don't find any information on this topic in this link, but shouldn't links be URL-encoded instead - e.g. " " becomes %20 etc.? In my opinion this should be done automatically by the tcl http package, but it isn't done - just checked it. It is done automatically by a browser (checked it with Konqueror: http://localhost:9000/Some Url/ becomes "GET /Some%20Url/ HTTP/1.1"). I guess it should at least be reverted to the old state, which would be less broken than what there is now. til -- http://tsinger.com |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-24 16:00:51
|
Hi. Commited the following patch, because HTML entities have to be substituted by the user agent before doing the url request: http://validator.w3.org/docs/errors.html#bad-entity -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-19 18:25:14
|
On Sat, Feb 15, 2003 at 11:11:13AM +0000, Tilmann Singer wrote: > [...] but why I actually wrote it is to say that the current > requirement to be able to read the tcl comments from the test > source code is not really important, so don't jump through big > loops to preserve it when modifying tclwebtest to use strings > instead of temporary files, and please commit your patch with > these modifications, if not already done. Well, my patches with memory strings have problems when something goes wrong (infinite loop/recursion). And most importantly, the output log is buffered, while the current version logs as the test unit proceeds, which can be important for slow/busy. So I guess it's better to keep both ways. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-19 17:17:18
|
I've commited the following patch, which adds the -nocomplain_list option Til and me talked about on IRC. Little example to try with: do_request -nocomplain_list {403} http://www.google.com/search?&q=linux do_request -nocomplain_list {301 302 403 505} http://www.google.com/query=linux -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-19 16:31:54
|
This patch makes the following work: do_request -nocomplain http://wwwwe.ferbarer.net -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-19 15:39:27
|
> > I've commited the following patch. It has the potential of working > > with file urls, but I haven't tested that. It makes this work: > > > > do_request http://www.google.com/././//juanito/../juanito/.. > [...] > > That's cool. I would suggest to write a selftest for this though. Done. In the process I also refined the regular expression. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-19 14:45:34
|
On Wed, Feb 19, 2003 at 07:13:01AM +0000, Tilmann Singer wrote: > I just was asked if it was possible to simulate double-clicking > on form submit buttons with tclwebtest. I don't think so actually, > but it would be a really useful feature, so I'd like to add it if > it's not possible to achieve it with the current code. Huh... is it possible to double click a form submit button? -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Tilmann S. <ti...@ti...> - 2003-02-19 07:14:47
|
Hi, I just was asked if it was possible to simulate double-clicking on form submit buttons with tclwebtest. I don't think so actually, but it would be a really useful feature, so I'd like to add it if it's not possible to achieve it with the current code. (after my holiday, which ends on the 25th) til -- http://tsinger.com |
From: Tilmann S. <ti...@ti...> - 2003-02-19 06:14:54
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030218 18:37]: > I've commited the following patch. It has the potential of working > with file urls, but I haven't tested that. It makes this work: > > do_request http://www.google.com/././//juanito/../juanito/.. [...] That's cool. I would suggest to write a selftest for this though (if you have time). Since the functionality is clearly separated out in the post_process_url proc that's quite easy, e.g. just call post_process_url a few times with some complicated values and expect the correct reply. cheers, Til -- http://tsinger.com |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-18 18:35:31
|
I've commited the following patch. It has the potential of working with file urls, but I haven't tested that. It makes this work: do_request http://www.google.com/././//juanito/../juanito/.. Index: lib/tclwebtest.tcl =================================================================== RCS file: /cvsroot/tclwebtest/tclwebtest/lib/tclwebtest.tcl,v retrieving revision 1.25 diff -u -r1.25 tclwebtest.tcl --- lib/tclwebtest.tcl 15 Feb 2003 11:01:07 -0000 1.25 +++ lib/tclwebtest.tcl 18 Feb 2003 18:30:53 -0000 @@ -2035,7 +2035,7 @@ # a selftest regsub {#[^#]*$} $url {} url - set url [absolute_link $url] + set url [post_process_url [absolute_link $url]] set previous_url $::tclwebtest::url set ::tclwebtest::url $url @@ -2326,6 +2326,29 @@ return "$host_path_part/$url" } } +} + + +ad_proc -private post_process_url { + url +} { + + Do some url cleanup, like substitution of '/./' or '/..'. + +} { + + # substitute /././ + regsub -all {/(\./)+} $url "/" url + regexp {([^:]+)://([^/]+)(.*)} $url match protocol domain path + if { $match != "" } { + # substitute 'folder/..' + while { [regsub {/[^/]+(/\.\.(/|$))} $path "/" path] } { } + # substitute '/////' + regsub -all {//+} $path "/" path + set url "$protocol://$domain$path" + } + return $url + } -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-18 17:39:54
|
> I was wondering if tclwebtest can handle basic http authentication? This patch adds support for http authentication. Til, do you like it? I didn't know very well what to do with the package requeriment, so I added a fake base64::encode function for environments where this is not available (like my web interface). Here's a basic test unit and it's generated log: set serv http://ws5.efaber.net/public_html http_auth "$serv" pepe pepe http_auth "$serv/a" a pepe http_auth "$serv/b" b pepe http_auth "$serv/c" a pepe set l [list "$serv\/a" "$serv/b" "$serv/c"] foreach url $l { do_request -nocomplain $url } > ----- START: in_memory string at [18/Feb/2003:18:25:55] ----- > --- do_request for http://ws5.efaber.net/public_html/a > http status: >>401<< > Retrying url with preset authentication > --- do_request for http://ws5.efaber.net/public_html/a > http status: >>301<< > Attention! Redirection 301 was ignored, but please update your test unit, it's a bug! > following a redirect to: http://ws5.efaber.net/public_html/a/ > --- do_request for http://ws5.efaber.net/public_html/a/ > http status: >>401<< > Retrying url with preset authentication > --- do_request for http://ws5.efaber.net/public_html/a/ > http status: >>200<< > --- do_request for http://ws5.efaber.net/public_html/b > http status: >>401<< > Retrying url with preset authentication > --- do_request for http://ws5.efaber.net/public_html/b > http status: >>301<< > Attention! Redirection 301 was ignored, but please update your test unit, it's a bug! > following a redirect to: http://ws5.efaber.net/public_html/b/ > --- do_request for http://ws5.efaber.net/public_html/b/ > http status: >>401<< > Retrying url with preset authentication > --- do_request for http://ws5.efaber.net/public_html/b/ > http status: >>200<< > --- do_request for http://ws5.efaber.net/public_html/c > http status: >>401<< > Retrying url with preset authentication > --- do_request for http://ws5.efaber.net/public_html/c > http status: >>401<< > Incorrect password > Bad http answer ignored due to -nocomplain > ----- SUCCESS: in_memory string (took 0s) While the 'in_memory string' delates it's a log from my web interface, it works there because I manually included the base64.tcl file from tcllib so that the package could be satisfied. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Grzegorz A. H. <gr...@ef...> - 2003-02-17 17:33:38
|
On Sun, Feb 16, 2003 at 02:37:22AM -0800, Chris Rasch wrote: > > Thanks for writing tclwebtest and making it available under > > the GPL. I was wondering if tclwebtest can handle basic http > > authentication? A cursory glance through the code suggests no, > > but I was wondering if I had missed something. > > It doesn't handle it unfortunately. You are free to add it > of course, patches are welcome ;-). I don't know if the tcl > http package can handle it - in any way the place to add that > functionality would be within the do_request proc by modifying > the headers variable I think. Chris, I talked with Til in IRC and maybe for tomorrow you could have a patch supporting this. Basically it would add the following function to the api: http_auth prefix_url user pass It would set the user/pass for that prefix_url. Since .htaccess can change for each directory, you could have different prefix_url with the same domain, and tclwebtest would search first the longest matching prefix, and use the user/pass directly notifying of this in the output log. Do you consider this ok? Maybe we left out something. -- Grzegorz Adam Hankiewicz, gr...@ef.... Tel: +34-94-472 35 89. eFaber SL, Maria Diaz de Haro, 68, 2 http://www.efaber.net/ 48920 Portugalete, Bizkaia (SPAIN) |
From: Chris R. <cr...@op...> - 2003-02-16 07:38:35
|
[forwarded from private correspondence, in case anyone else has a similar question] Hi, * Chris Rasch <cr...@op...> [20030216 07:09]: > Thanks for writing tclwebtest and making it available under the GPL. I > was wondering if tclwebtest can handle basic http authentication? A > cursory glance through the code suggests no, but I was wondering if I > had missed something. It doesn't handle it unfortunately. You are free to add it of course, patches are welcome ;-). I don't know if the tcl http package can handle it - in any way the place to add that functionality would be within the do_request proc by modifying the headers variable I think. ... cheers, Til -- http://tsinger.com |