[tclwebtest] link feature suggestion
Status: Abandoned
Brought to you by:
tils
From: Grzegorz A. H. <gr...@ef...> - 2003-03-27 17:41:41
|
The link command is ok when you can differentiate links through their text or their urls. However, there are many pages where links are presented in a table, and the differentiative text is in one column as normal text, and the related links are in another column but with symbolic names in their urls. This scenario is usually found in dynamic pages which read from a database and use internal identificatives to point to the url: ..../show-this?id=xxx where xxx is an unrelated number. At the moment the only way to find correctly a link among many of these choices is to use a regexp on [response body]. A solution would be adding to link -find the modifiers (b)efore and (a)fter, which would select the link only if the specified regexp is found before/after the link, of course using neighbour links as search limits. A -prev option would be useful with this system too. Possible example: do_request http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tclwebtest/tclwebtest/selftest/ link find 1.1 ~a "*** empty log message ***" link find -prev # now caption2.html would be selected at the moment of writting this The capitalised version of ~a/b would search in html code instead of text. -- 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) |