[tclwebtest] Adding support for get forms
Status: Abandoned
Brought to you by:
tils
From: Grzegorz A. H. <gr...@ef...> - 2003-02-06 11:03:59
|
Hi. After being able to browse google with the previous cookie patch, I was unable to use their forms because they use get method. The following patch adds support for this. Note that there's a lot of global logic which could be shared, maybe it would be worth it to separate the current function in little pieces (get/post_init, get/post_process, get/post_finish) and use function pointers to it, so that the logic is common but the implementation is different. There are few lines of code now, so it doesn't look worth it, my instinct says otherwise, because there's place to implement the feature of searching a specific submit button (now, the get method only sends the first one it finds). The bad news of this patch is that there must be some other cookie problem hidden around, because the following script doesn't work. It reaches the point of doing the submit, and it tries to follow the built do_request url, but Google returns a 403 forbidden access. There must be something in the do_request headers tclwebtest sends which Google rejects, because I can copy/paste that url and use it directly from any browser. Using that query url in a one line tclwebtest script fails too. do_request http://www.google.com/ link follow "advanced search" field fill linux field select 20 field fill "Grzegorz Adam Hankiewicz" field fill "kill protector" field fill Microsoft # here fails with 403 form submit log [response 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) |