tclwebtest-general Mailing List for tclwebtest (Page 2)
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: Michael H. <Mic...@qu...> - 2004-01-28 15:26:57
|
Peter, Excellent! That works a treat. I also looked into the automated install = and it looks pretty robust. I won't be able to test it until I'm back on a = Unix based project. We're on Windows right now and unfortunately I'm = unlikely to find time to port your scripts. Many thanks, Michael > -----Original Message----- > From: Peter Marklund [mailto:pet...@fa...] > Sent: 28 January 2004 14:56 > To: Michael Hinds; tcl...@li... > Subject: RE: [tclwebtest] Checking a checkbox using the value >=20 >=20 > Hey Michael! > I happened to come across the need to check some checkboxes=20 > myself. It's > odd, I always assumed you could use field select for them but it = seems > you can't. However, I drafted a new proc that you can get if you cvs > update / checkout tclwebtest. Here is the proc: >=20 > ad_proc -private field_check_multiple { > checkbox_name > checkbox_values > } { > Loop over a group of checkboxes with a given name and select > those with a value matching a list of values. >=20 > @checkbox_name The name of the checkboxes to check > @checkbox_values A list of values that indicate which=20 > checkboxes to > check >=20 > @autor Peter Marklund > } { > while { 1 } { > if { [catch {field find -next ~n $checkbox_name ~t=20 > checkbox}] } { > # No more checkboxes > break > } > =20 > array set current_field [::tclwebtest::field_current] >=20 > set checkbox_value [lindex $current_field(choices) 1] > if { [lsearch -exact $checkbox_values=20 > $checkbox_value] !=3D -1 } { > field check > } else { > # field_find -next will give us the current field=20 > eternally > as > # long as it hasn't been modified so increment=20 > current field > manually > incr ::tclwebtest::current_field > } > } > } >=20 > Use it like this: >=20 > field check_multiple my_checkbox_name [list value1 value2 value3] >=20 > Peter > =20 > ---------------------------- > Peter Marklund > C/O Thomas Sch=F6nbeck > Oster Farimagsgade 77 > 2100 Copenhagen > Denmark >=20 > Work Phone: +45-33436380 > Mobile phone: +45-20820101 > Home phone: +45-35559440 > http://collaboraid.biz > http://petermarklund.com > ---------------------------- >=20 > http://fastmail.fm - the way e-mail *should* be >=20 |
From: Peter M. <pet...@fa...> - 2004-01-28 14:55:57
|
Hey Michael! I happened to come across the need to check some checkboxes myself. It's odd, I always assumed you could use field select for them but it seems you can't. However, I drafted a new proc that you can get if you cvs update / checkout tclwebtest. Here is the proc: ad_proc -private field_check_multiple { checkbox_name checkbox_values } { Loop over a group of checkboxes with a given name and select those with a value matching a list of values. @checkbox_name The name of the checkboxes to check @checkbox_values A list of values that indicate which checkboxes to check @autor Peter Marklund } { while { 1 } { if { [catch {field find -next ~n $checkbox_name ~t checkbox}] } { # No more checkboxes break } =20=20=20=20=20=20=20=20 array set current_field [::tclwebtest::field_current] set checkbox_value [lindex $current_field(choices) 1] if { [lsearch -exact $checkbox_values $checkbox_value] !=3D -1 } { field check } else { # field_find -next will give us the current field eternally as # long as it hasn't been modified so increment current field manually incr ::tclwebtest::current_field } } } Use it like this: field check_multiple my_checkbox_name [list value1 value2 value3] Peter =20 ---------------------------- Peter Marklund C/O Thomas Sch=F6nbeck Oster Farimagsgade 77 2100 Copenhagen Denmark Work Phone: +45-33436380 Mobile phone: +45-20820101 Home phone: +45-35559440 http://collaboraid.biz http://petermarklund.com ---------------------------- http://fastmail.fm - the way e-mail *should* be |
From: Peter M. <pe...@co...> - 2004-01-28 11:09:14
|
Hey Michael! For automatic build of OpenACS and .LRN you should use the install scripts that we have put quite a lot of work into. If you use them I'm sure we'd get some valuable feedback so that we can improve them further. Obtain the scripts like this: cvs -d :pserver:ano...@op...:/cvsroot checkout openacs-4/etc/install There is a document that says a little about how to use the scripts here: http://openacs.org/doc/openacs-HEAD/openacs.html Good luck! Peter On Wed, 28 Jan 2004 10:28:14 -0000, "Michael Hinds" <Mic...@qu...> said: > Thanks, Peter. I can get it to work using field find, field check, field > find -next, etc. but because all the checkboxes have the same name, I'm > relying on them being displayed in a particular order. > > Since I know you have expertise in the area I can go into a bit more > detail > ;) I'm automating a build of an OpenACS system, and the page in question > is > the one in the APM where you select which packages to install. I could > write > my own scripts to do this but I think it's cleaner to have the test > harness > completely external. > > Out of interest, how are you guys doing the rebuild of dotLRN every > night? > > > -----Original Message----- > > From: Peter Marklund [mailto:pe...@co...] > > Sent: 27 January 2004 19:12 > > To: Michael Hinds; tcl...@li... > > Subject: Re: [tclwebtest] Checking a checkbox using the value > > > > > > Hey Michael! > > I'm not 100% sure you can use this for checkboxes, but I > > think you can. > > Here it is: > > > > field select2 ~v value > > > > Look at the file > > > > http://cvs.openacs.org/cvs/openacs-4/contrib/packages/simulati > > on/test/simulation-test-procs.tcl?view=auto&rev=1.13 > > > > for examples of this. > > > > Peter > > > > On Tue, 27 Jan 2004 18:55:51 -0000, "Michael Hinds" > > <Mic...@qu...> said: > > > I'm trying to select a checkbox using its value. The HTML > > is something > > > like > > > this: > > > > > > <input type=checkbox name=enable value="some-identifier-here"> > > > <input type=checkbox name=enable value="something-else-here"> > > > <input type=checkbox name=enable value="and-another"> > > > > > > I thought I could use: > > > > > > field check ~v general-comments > > > > > > but it throws the field not found exception. The following > > works, but > > > isn't > > > very useful to me: > > > > > > field check ~n enable > > > > > > If anyone knows what I'm doing wrong off the top of their head, I'd > > > appreciate the help. > > > > > > Thanks, > > > > > > Michael > > > > > > > > > > > > > > > ------------------------------------------------------- > > > The SF.Net email is sponsored by EclipseCon 2004 > > > Premiere Conference on Open Tools Development and Integration > > > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > > > http://www.eclipsecon.org/osdn > > > _______________________________________________ > > > Tclwebtest-general mailing list > > > Tcl...@li... > > > https://lists.sourceforge.net/lists/listinfo/tclwebtest-general > > Collaboraid > > - Open Source Web Collaboration Software > > http://www.collaboraid.biz > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Tclwebtest-general mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tclwebtest-general Collaboraid - Open Source Web Collaboration Software http://www.collaboraid.biz |
From: Michael H. <Mic...@qu...> - 2004-01-28 10:34:15
|
Thanks, Peter. I can get it to work using field find, field check, field find -next, etc. but because all the checkboxes have the same name, I'm relying on them being displayed in a particular order. Since I know you have expertise in the area I can go into a bit more detail ;) I'm automating a build of an OpenACS system, and the page in question is the one in the APM where you select which packages to install. I could write my own scripts to do this but I think it's cleaner to have the test harness completely external. Out of interest, how are you guys doing the rebuild of dotLRN every night? > -----Original Message----- > From: Peter Marklund [mailto:pe...@co...] > Sent: 27 January 2004 19:12 > To: Michael Hinds; tcl...@li... > Subject: Re: [tclwebtest] Checking a checkbox using the value > > > Hey Michael! > I'm not 100% sure you can use this for checkboxes, but I > think you can. > Here it is: > > field select2 ~v value > > Look at the file > > http://cvs.openacs.org/cvs/openacs-4/contrib/packages/simulati > on/test/simulation-test-procs.tcl?view=auto&rev=1.13 > > for examples of this. > > Peter > > On Tue, 27 Jan 2004 18:55:51 -0000, "Michael Hinds" > <Mic...@qu...> said: > > I'm trying to select a checkbox using its value. The HTML > is something > > like > > this: > > > > <input type=checkbox name=enable value="some-identifier-here"> > > <input type=checkbox name=enable value="something-else-here"> > > <input type=checkbox name=enable value="and-another"> > > > > I thought I could use: > > > > field check ~v general-comments > > > > but it throws the field not found exception. The following > works, but > > isn't > > very useful to me: > > > > field check ~n enable > > > > If anyone knows what I'm doing wrong off the top of their head, I'd > > appreciate the help. > > > > Thanks, > > > > Michael > > > > > > > > > > ------------------------------------------------------- > > The SF.Net email is sponsored by EclipseCon 2004 > > Premiere Conference on Open Tools Development and Integration > > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > > http://www.eclipsecon.org/osdn > > _______________________________________________ > > Tclwebtest-general mailing list > > Tcl...@li... > > https://lists.sourceforge.net/lists/listinfo/tclwebtest-general > Collaboraid > - Open Source Web Collaboration Software > http://www.collaboraid.biz > |
From: Kolja L. <ma...@ko...> - 2004-01-28 03:36:10
|
For the ~v flag tclwebtest must recognize the value of the field as visible to the user, so the text that is displayed along with the checkbox. Are you using a <label>-tag? The logic for getting the value of a checkbox is not very straightforward, but it may help to debug [field all] to see, which values the parser found. Hope it helps Kolja |
From: Peter M. <pe...@co...> - 2004-01-27 19:12:26
|
Hey Michael! I'm not 100% sure you can use this for checkboxes, but I think you can. Here it is: field select2 ~v value Look at the file http://cvs.openacs.org/cvs/openacs-4/contrib/packages/simulation/test/simulation-test-procs.tcl?view=auto&rev=1.13 for examples of this. Peter On Tue, 27 Jan 2004 18:55:51 -0000, "Michael Hinds" <Mic...@qu...> said: > I'm trying to select a checkbox using its value. The HTML is something > like > this: > > <input type=checkbox name=enable value="some-identifier-here"> > <input type=checkbox name=enable value="something-else-here"> > <input type=checkbox name=enable value="and-another"> > > I thought I could use: > > field check ~v general-comments > > but it throws the field not found exception. The following works, but > isn't > very useful to me: > > field check ~n enable > > If anyone knows what I'm doing wrong off the top of their head, I'd > appreciate the help. > > Thanks, > > Michael > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Tclwebtest-general mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tclwebtest-general Collaboraid - Open Source Web Collaboration Software http://www.collaboraid.biz |
From: Michael H. <Mic...@qu...> - 2004-01-27 19:01:48
|
I'm trying to select a checkbox using its value. The HTML is something like this: <input type=checkbox name=enable value="some-identifier-here"> <input type=checkbox name=enable value="something-else-here"> <input type=checkbox name=enable value="and-another"> I thought I could use: field check ~v general-comments but it throws the field not found exception. The following works, but isn't very useful to me: field check ~n enable If anyone knows what I'm doing wrong off the top of their head, I'd appreciate the help. Thanks, Michael |
From: Kolja L. <kol...@un...> - 2003-12-16 07:57:24
|
Hi Is there a feature like the all-so-useful back button in tclwebtest? If=20 not, we would write that feature. I envision something like a package=20 variable ::tclwebtest::history which contains a list of all pages visited= =20 (the response full value or so). That might become rather big, but maybe there can be a parameter=20 "history_Size" or so. Any suggestions? Kolja=20 |
From: Vamshi K. K. <vam...@az...> - 2003-12-11 13:44:21
|
i am facing a problem with a multiselect i am having two multi select boxes My test case file is in red & the html file is in green & the error is in violet please can any body help on this do_request "file:///home/vamshi/Desktop/traineeship-desc.html" #Entering the Values for Traineeship Description assert text "Objectives" assert text "Traineeship Focus" debug [field find ~n "experience"] field multiselect "Marketing" debug [field find ~n "traineeship_focus"] field multiselect "Corporate Social Responsibility" field multiselect "Entrepreneurship" field multiselect "Information And Society" my file is <form name="traineeship-description" method="post" action="/insight/exchange/traineeship-desc" enctype="multipart/form-data"> <table border=1> <tr><td colspan=2><b>Objectives</b></td> </tr> <tr> <td><b>Traineeship Focus</b></td> <td > <select name="traineeship_focus" multiple="multiple" size="6"> <option value="1" selected="selected">Corporate Social Responsibility</option> <option value="2">Cultural Understanding</option> <option value="3" selected="selected">Entrepreneurship</option> <option value="4">Higher Education And Learning</option> <option value="5" selected="selected">Information And Society</option> <option value="6">No Particular Traineeship Focus</option> </select> </td> </tr> <tr> <td><span >*</span> <b>Field of Experience</b> </td> <td > <select name="experience" multiple="multiple" size="8"> <option value="1">Accounting</option> <option value="2">Business Administration</option> <option value="3">Development Studies</option> <option value="4">Economics</option> <option value="5">Linguistics Education</option> <option value="6">Finance</option> <option value="7" selected="selected">Information Technology</option> <option value="8" selected="selected">Marketing</option> <option value="9">Other Studies</option> <option value="10">Human Resource</option> <option value="12">Cultural Education</option> <option value="13">Subjects Education</option> <option value="14">Social sciences</option> </select> </td> </tr> </table> This field doesn't contain the following choices: `Marketing'. It's only offerings are: {1 {Corporate Social Responsibility}} {2 {Cultural Understanding}} {3 Entrepreneurship} {4 {Higher Education And Learning}} {5 {Information And Society}} {6 {No Particular Traineeship Focus}} in "temp.test" line 9: #Entering the Values for Traineeship Description assert text "Objectives" assert text "Traineeship Focus" debug [field find ~n "experience"] field multiselect "Marketing" ----- FAILED: temp.test (took 0s) ----- DURATION: 0 1 of 1 tests FAILED: temp.test |
From: Vamshi K. K. <vam...@az...> - 2003-12-10 12:15:57
|
i am facing a problem with the selection of the radio button i am using tclwebtest::field select "Yes" This is the error This field has no choice Yes. It's only offerings are: {Y { } orgn_contact_search:elements:alumni:Y} {N { } orgn_contact n_contact_search:elements:alumni:D} the form page here is built by the ad_form, this error occurs because the ad_form templating generates the radio button like <tr><td> <input type="radio" name="alumni" value="Y" id="orgn_contact_search:elements:alumni:Y" checked /> </td> <td><label for="orgn_contact_search:elements:alumni:Y">Yes</label></td></tr> i need a help please did any body used for the test cases for the radio button with the ad_form templating system field_select is the pros internally used by the "field select" call, but the problem with radio button is, that the program has to guess, what the name of each option is. With a select box it is clear, because it is included in the option-tag. If the radio buttons and their captions are located in separate table cells (as it is in the default standard.adp form template), the caption is empty, so there is no way of determining the right option to choose. As you can see, in that list of choices given above, the second element (the caption) is always { }. Does anyone know if it possible to select a radio button by its id? Or maybe it would be a good idea to extend the search for the caption on the whole tr the radio button is in. |
From: Peter M. <pe...@co...> - 2003-10-29 11:26:52
|
Hello all! I'm having a problem with Tclwebtest not finding all links on an HTML page. Attached you'll find a test script and an html page to reproduce the problem. I have a regexp that I believe finds all links on the page. At least it finds more links than Tclwebtest does. Not sure if a regexp like this should be worked into Tclwebtest, but it's what I'll be using until the issue is resolved. Regards Peter --------------------------------- Peter Marklund Collaboraid Havnegade 39 1058 K=F8benhavn K Denmark Phone: (+45) 33 43 63 80 Mobile: (+45) 20 82 01 01 Fax: (+45) 33 43 63 32 http://collaboraid.biz --------------------------------- |
From: Grzegorz A. H. <gr...@ef...> - 2003-10-28 11:52:59
|
On 2003-10-27, Tilmann Singer <ti...@ti...> wrote: > * James Drabb <JD...@da...> [20031027 14:29]: > > Thanks Til. Are there any tarballs of the latest CVS? > > Unfortunately not. Actually we could put out a release, just for > fun. Well, propably fix some outstanding bugs before - opinions. "Release early, release often.", or, "Source code is like fertilizer. It stinks when you hoard it, but when you spread it around, things grow.". Here's a changelog for you to publish at SF/Freshmeat. Added -tidy switch, improved usage message. Andrew Piskorsis improved cookie regexp. Fixed HTML entity processing in redirects. Gordon Molek found out query_key_values were forgotten during http_auth retries. Small improvements to the documentation. Documented `field get_*'. Fixed an error in an error message. Corrected processing of semicolons in redirected urls by eval. Added -append switch to `field fill'. Avoiding repetitive use of tidy after chained redirections. Corrected missing variable declaration when using ~n without parameter. Fixing field select to select only the value, not the caption, thanks to Peter Marklund. Enclosing location in braces in calls of do_request so that it works with $ in urls. > This seems absurd to me, why make people's lives unnecessarily > hard ... I know it's not your fault. Are they so security concsious > that also all microsoft operating systems and browsers are banned > from use within the company? There would be no company! :) BTW, next week I'm switching job and moving to another country, so no more funny replies from me for a while. -- 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: James D. <JD...@da...> - 2003-10-27 14:36:24
|
On Mon, 2003-10-27 at 09:05, Tilmann Singer wrote: > * James Drabb <JD...@da...> [20031027 14:29]: > > Thanks Til. Are there any tarballs of the latest CVS? > > Unfortunately not. Actually we could put out a release, just for > fun. Well, propably fix some outstanding bugs before - opinions. You could be a nice guy and send me a tarball : ) I put out a few J2EE apps and the first one the company paid around $50,000 to have some external company to test it and give them a nice excel sheet with some purdy graphs. This time the company said they would do it for only $30,000. So I am trying to save much cash here by using tclwebtest. I tried a few others, though most were not as configurable/scriptable to get past Netegrity. > > My corporate firewall does not allow external CVS. > > This seems absurd to me, why make people's lives unnecessarily hard > ... I know it's not your fault. Are they so security concsious that > also all microsoft operating systems and browsers are banned from use > within the company? If not then what's the point? It is sad. Unfortunately the firewall is controlled by MS Admins here and not the Solaris/Linux admins : ( They allow in telnet and not ssh! I think they block CVS just because they don't really know about it and have everything blocked by default and only open up ports as needed, I think they only understand source safe. This is a fortune 500 company by the way. I would love to get a hold of that firewall and fix it up, though as a programmer, that is not one of my job functions. I still don't understand why in the world they let telnet through the firewall and not ssh. > til P.S. I noticed at the top of emails from this list it states: Please consider using an e-mail program other than Outlook.It's insecure Is this sent to everyone of just me? I am using Evolution with Ximian connector to connect to our horrid exchange 2002 server. Jim Drabb -- ---------------------------------------------------------- The box said: "Requires Windows 98/2000/XP/NT, or better." So, I installed LINUX! ---------------------------------------------------------- James Drabb JR Senior Programmer Analyst Darden Restaurants Business Systems JDrabb at Darden dot com |
From: Tilmann S. <ti...@ti...> - 2003-10-27 14:09:53
|
* James Drabb <JD...@da...> [20031027 14:29]: > Thanks Til. Are there any tarballs of the latest CVS? Unfortunately not. Actually we could put out a release, just for fun. Well, propably fix some outstanding bugs before - opinions. > My corporate firewall does not allow external CVS. This seems absurd to me, why make people's lives unnecessarily hard ... I know it's not your fault. Are they so security concsious that also all microsoft operating systems and browsers are banned from use within the company? If not then what's the point? til -- http://tsinger.com |
From: James D. <JD...@da...> - 2003-10-27 13:28:06
|
On Sun, 2003-10-26 at 13:18, Tilmann Singer wrote: > I think I fixed it in CVS - could you update and confirm that the > problem is gone when you have time? > > > thanks, Til Thanks Til. Are there any tarballs of the latest CVS? My corporate firewall does not allow external CVS. Jim Drabb -- ---------------------------------------------------------- The box said: "Requires Windows 98/2000/XP/NT, or better." So, I installed LINUX! ---------------------------------------------------------- James Drabb JR Senior Programmer Analyst Darden Restaurants Business Systems JDrabb at Darden dot com |
From: Tilmann S. <ti...@ti...> - 2003-10-26 18:20:11
|
* James Drabb <JD...@da...> [20031024 16:59]: > Your tclwebtest tool look great. However, I am running into an error. > We are using Netegrity to protect our sites and allow single sign on > across our Enterprise. When we try to go into an application, Netegrity > stops the request and sends a redirect to a login form. In my test > script I am doing a field fill for the user name and password. > However, the URL that Netegrity builds has a $ in one of the parameter > names which seems to cause tclwebtest to error out. A typical Netegrity > URL looks like: > > https://awx.foo.com/siteminder/login.fcc > ?TYPE=33554433 > &REALMOID=06-604fd5ae-e29c-4d13-9190-df4524801912 > &GUID= > &SMAUTHREASON=0 > &TARGET=$SM$https%3a%2f%2fpsportal%2efoo%2ecom%2flogin%2ehtml%2f > > I broke the URL into its parts. The last parameter &Target= is what > seems to kill tclwebtest since the parameter value has $SM$ at the > beginning. Part of the error I get back is: > > can't read "SM": no such variable > while executing > ... > > Is there anyway around this? I think I fixed it in CVS - could you update and confirm that the problem is gone when you have time? thanks, Til -- http://tsinger.com |
From: Tilmann S. <ti...@ti...> - 2003-10-22 14:44:42
|
[replying to the tclwebtest list where this belongs to] * Peter Marklund <pet...@fa...> [20031022 13:01]: > Turns out there is a bit of a slowness problem with Tclwebtest on the > /acs-lang page. Why? Maybe because of a huge select box with timezones. > Below is a snippet of debug printouts. The parse_caption_before <number> > statements pop out *really* slow, as in once a second or so. Do you have > any idea why this is so? > > I've tracked down that it's when I invoke form find on the page that the > slowness begins. > > Please find attached the acs-lang index page. > > following a redirect to: > http://dotlrn20-pg-test.collaboraid.net/acs-lang/ [...] I don't have an answer for this specific problem, just the general observation that the way tclwebtest parses html is bound to be slow and potentially very slow with big pages or unexpected html structures. I did some experiments with the html parsing mode of tdom and some other html parsing library which was written in tcl but found both not sufficient for various reasons. The main problem with tdom remains (last tested version 0.7.7) that it is not forgiving enough for malformed html. Last time I tested against openacs html it borked on the site-map, on some pages in bug-tracker and propably on some parts of the standard form templates as well. Of course changing to a more strict html parsing mode would produce a stronger motivation to fix those very broken html pages, which would be good for openacs, but would narrow the usability of tclwebtest. Also tdom would add an installation requirement. I'd rather use an html parsing library that is almost as lenient as tclwebtest is right now, but I didn't find it yet. That all said, it might well be that the specific slowness you are talking about can be fixed by tweaking some regexes, but I don't have time to look into it right now. cheers, til -- http://tsinger.com |
From: Tilmann S. <ti...@ti...> - 2003-09-29 19:18:30
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030929 19:06]: > Search freshmeat.net for javascript. There are two libraries with > potential to be embedded as C modules with a tcl binding. This surely > means huge work, currently tclwebtest doesn't "understand" web pages > as a browser, only scans a few tags here and there to get an idea, > and for javascript to work you would need a DOM like implementation. Agreed - the whole parsing stuff has some kind of quick hack approach and is definitely far from how a browser is able to treat html. Most of the times it is possible to work around - especially if you have influence on the server that produces the html. If you really want to do browser-like html parsing it would make a lot of sense to control a browser with the scripts, e.g. mozilla or konqueror but that's a completely different approach. til |
From: Grzegorz A. H. <gr...@ef...> - 2003-09-29 17:04:48
|
On 2003-09-29, Andrew Piskorski <at...@pi...> wrote: > Javascript support sounds ugly and nasty, but potentially useful. > I've definitely seen forms out there which use all sorts of > JavaScript in ways that accidentally make it awfully hard to > figure out just what the underlying (but often very simple!) for > submission is. Search freshmeat.net for javascript. There are two libraries with potential to be embedded as C modules with a tcl binding. This surely means huge work, currently tclwebtest doesn't "understand" web pages as a browser, only scans a few tags here and there to get an idea, and for javascript to work you would need a DOM like implementation. -- 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: Andrew P. <at...@pi...> - 2003-09-29 12:28:57
|
On Sun, Sep 28, 2003 at 06:37:42PM +0000, Tilmann Singer wrote: > * Andrew Piskorski <at...@pi...> [20030927 15:36]: > > E.g., are you loading the procs into AOLserver or exec'ing tclsh? Are > > you strictly using the tcllib http stuff with tclwebtest, or have you > I just wrote a small openacs package for my personal convenience that > acts as webinterface to tclwebtest, which uses a very evil hack to > make the tclwebtest procs available within aolserver: it calls > Ideally I would like to make it available via package require, but > that doesn't work with the older aolserver versions (at least not > 3.3ad13). It's propably an option with aolserver 4. Yeah, probably simplest to just ignore the issue for AOLserver 3.x, as 4.0 should make it simple Real Soon Now. FYI, since all I needed to load into my AOLserver 3.3+ad13 was the tclwebtest cookie handling stuff, I simply copied the 5 cookie procs and wrote a trivial bit of initialization code. (See below.) I'm using this with ns_httpspost from nsopenssl plus some glue code of my own. So far it all seems to work ok. The only major limitations I know of are: No frames support, and no javascript support. I don't know what frames support involves, but so far I've managed to avoid needing it. Javascript support sounds ugly and nasty, but potentially useful. I've definitely seen forms out there which use all sorts of JavaScript in ways that accidentally make it awfully hard to figure out just what the underlying (but often very simple!) for submission is. If I really needed JavaScript support, maybe the thing to do is to use Mozilla's, perhaps simply by running tclwebtest from within the Tcl plugin in Mozilla? That doesn't sound nearly as nice as just doing "package require http::javascript" or whatever, but it might actually be easy... Whereas I assume (without any actual knowledge) that extracting Mozilla's JavaScript support into a separate loadable C module with a nice API would be a royal PITA. Incidentally, I think tclwebtest sends ALL the cookies it has recorded to the server (using [tclwebtest::cookies clientvalue]), even if the the cookies are for a totally different web site. True? If so, this is not such of a problem, but should be documented. Hm, one thing I did not think of is cleaning up the per-thread ::tclwebtest::cookies global variable when I'm done. Guess I should probably call 'tclwebtest::cookies clear' to be safe... FYI, here's how I loaded the Tclwebtest cookie procs into AOLserver, in an OpenACS 4.6.3 environment: In tclwebtest-init.tcl : namespace eval tclwebtest { # A list that contains alternating cookie name and value. Value is # a list by itself, containing array key and value pairs. This is # different from the format of the other lists, e.g. links variable cookies [list] set cookies [list] } In tclwebtest-procs.tcl : namespace eval tclwebtest {} ad_proc -public tclwebtest::assertion_failed ... ad_proc -public tclwebtest::cookies ... ad_proc -private tclwebtest::scan_cookie_expiration_time ... ad_proc -private tclwebtest::set_cookie ... -- Andrew Piskorski <at...@pi...> http://www.piskorski.com |
From: Tilmann S. <ti...@ti...> - 2003-09-28 18:46:49
|
* Andrew Piskorski <at...@pi...> [20030927 15:36]: > I see some brief comments in the lastest lib/tclwebtest.tcl about > using tclwebtest from AOLserver, so clearly people are doing it. But > can you give me a bit more background on how you're using it? > > E.g., are you loading the procs into AOLserver or exec'ing tclsh? Are > you strictly using the tcllib http stuff with tclwebtest, or have you > patched it to use AOLservers, ns_httpget, etc. - perhaps even > nsopenssl's ns_https* commands as well? I just wrote a small openacs package for my personal convenience that acts as webinterface to tclwebtest, which uses a very evil hack to make the tclwebtest procs available within aolserver: it calls 'source' fot the tclwebtest libraries every time before they are needed. Actually it was planned to only source if necessary, saving some time when it has been sourced for the current thread already. I attached that proc that does that below. No idea why the on-demand sourcing is deactivated (see the delete namespace call after TODO). Ideally I would like to make it available via package require, but that doesn't work with the older aolserver versions (at least not 3.3ad13). It's propably an option with aolserver 4. hope that helps, til ad_proc -public twt_source_tclwebtest_if_necessary { } { Sources the tclwebtest library into the current thread, using the namespace ::tclwebtest. This also sources the included version of the tcl http package, under ::tclwebtest::http } { if { [namespace current] != "::" } { error "expected to be called in global namespace, but called from [namespace current] instead" } # TODO catch {namespace delete ::tclwebtest} if { [namespace children "::" "::tclwebtest"] != "::tclwebtest" } { ns_log notice "sourcing tclwebtest libraries for this thread" namespace eval ::tclwebtest:: { # Source the required http.tcl package, which is included # in the aolserver distribution. # Several things have to be "fixed" here before the # package can be sourced though. set http_package_file [open "[ns_info # home]/lib/tcl8.3/http2.3/http.tcl"] set http_package [read $http_package_file] close $http_package_file # the fileevents run in the global namespace, but we # sourced http under ::tclwebtest::http, so change the # callbacks accordingly. regsub -all -line {^(\s*fileevent.*)(http::)} # $http_package {\1[::tclwebtest::http_namespace]::} # http_package # fix the Host: header bug #TODO eval $http_package } # source the tclwebtest libraries source "[acs_package_root_dir tclwebtest]/tcl/tclwebtest.tcl" } else { ns_log notice "not sourcing tclwebtest because ::tclwebtest namespace already exists" } } -- http://tsinger.com |
From: Andrew P. <at...@pi...> - 2003-09-27 13:32:43
|
I see some brief comments in the lastest lib/tclwebtest.tcl about using tclwebtest from AOLserver, so clearly people are doing it. But can you give me a bit more background on how you're using it? E.g., are you loading the procs into AOLserver or exec'ing tclsh? Are you strictly using the tcllib http stuff with tclwebtest, or have you patched it to use AOLservers, ns_httpget, etc. - perhaps even nsopenssl's ns_https* commands as well? Searching the SourceForge list archived wasn't very informative... Personally, I am using nsopenssl's ns_httpsget and ns_httpspost, and am about to look into tclwebtest's cookie handling code to see if I can use that in conjunction with the ns_https* procs. -- Andrew Piskorski <at...@pi...> http://www.piskorski.com |
From: Grzegorz A. H. <gr...@ef...> - 2003-09-23 15:11:37
|
I've commited the following patch. It avoids running tidy multiple times after following a few 30x redirections or an error. Maybe this should be expanded for other cases as well? Index: lib/tclwebtest.tcl =================================================================== RCS file: /cvsroot/tclwebtest/tclwebtest/lib/tclwebtest.tcl,v retrieving revision 1.49 diff -u -r1.49 tclwebtest.tcl --- lib/tclwebtest.tcl 16 Sep 2003 11:01:03 -0000 1.49 +++ lib/tclwebtest.tcl 23 Sep 2003 15:04:57 -0000 @@ -2284,8 +2284,10 @@ log \"Bad http answer ignored due to -nocomplain\" }" + set avoid_tidy_p 0 # is it a redirect ? if { $http_status == "302" || $http_status == "301" } { + set avoid_tidy_p 1 for { set i 0 } { $i < [llength $meta] } { incr i 2 } { if { [string match -nocase [lindex $meta $i] "location"] } { set location [translate_entities [string trim [lindex $meta [expr $i+1]]]] @@ -2369,12 +2371,15 @@ eval $failure_treatement } } elseif { $http_status != "200" } { + set avoid_tidy_p 1 eval $failure_treatement } [http_namespace]::cleanup $token - maybe_tidy + if { !$avoid_tidy_p } { + maybe_tidy + } return $final_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-09-16 11:01:01
|
On 2003-08-22, Tilmann Singer <ti...@ti...> wrote: > * Grzegorz Adam Hankiewicz <gr...@ef...> [20030730 10:18]: > > When using [field select -index whatever], it would be nice > > if this returned the selected text. The purpose of this would > > be selecting something from the select at random, saving the > > text in a variable, and check that the selected text appears > > somewhere in the next web page after the form has been submited. > > Sounds useful. It seems a little bit complicated to insert a > return value especially for one variant of the field command, > maybe doing something like this in the test would be sufficient: > > field select -index whatever > set selected_text [field get_selected_text] > > However, the selected_text attribute is not yet implemented - > I'll try to remember it and see if I can add it one day (or > somebody else is faster ;-) Guess what, it was all implemented: field get_choices retrieves a pair list with the contents of the select box, so with an llength you can create the limit for the random command. And you can get the selected value with field get_value, it returns empty string, one string, or a list of strings depending on the status of the select box. I've added a few asserts to a test to check this. -- 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-09-15 16:28:01
|
On 2003-07-24, Grzegorz Adam Hankiewicz <gr...@ef...> wrote: > Just writting some test cases and found that there are some forms > with filled fields where I would like to append something to a > field instead of filling it, operation which deletes the current > content. So I propose something like `field append' which behaves > exactly like `field fill' when the text area is empty. Instead of adding another subcommand I implemented this as a switch of 'field fill'. Commited patch attached. -- 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) |