Mail Archive Home | clif List | Febuary 2008 Index
| <-- Date Index --> | <-- Thread Index --> |
Marc van Dam_new wrote:
Hello Bruno,
Hello Marc,I'm pleased that your mail is explicitely addressed to me, but probably it would be more correct to talk to the CLIF community... ;-)
Urlier I emailed some questions, for any reason the question stayed unanswered. (maybe because I used hotmail.com address??)
I don't know, but I actually don't remember having read from you before.
In my understanding, what you want to do is to extract some value from the received HTML page and to insert this value in your next request. The general schema to do this is to put the result of your GET in a variable (option in the GET parameters page), then to set a StringHandler plug-in's value with this variable using the ${httpPluginId:my_variable_for_last_loaded_page}, then to use this StringHandler to extract the value, for instance based on a regular expression. An alternative is to implement this parsing feature in an HTML-specific way directly in the HttpInjector. Finally, you send your POST method inserting the extracted value at the right place with a variable expression ${parserId:value}Question: Is it possible in HttpInjector to get variables from specific (hidden) form content??For example: I need to do 1x GET 1x POST command.In the GET command a website is received with for example following form:<form action="test.htm" method="get" name="mytest"> Username: <input name="username" type="text"> Password: <input type="password" name="textfield"> <input name="MYFIELD1" type="hidden" value="CHANGING CODE"> <input type="submit" name="Submit" value="Submit"> </form> I need a variable to store "value" of MYFIELD1. So I can laterre-use it when I use POST.Is this in any way possible with Clif??
The thing is both ways are possible but not implemented yet.If you are a Java developer, it won't take long for you to extend the StringHandler or the HttpInjector ISAC plug-in so that it can parse the last loaded HTML page and extract the value. This would be typically done by wrapping Java's StringBuilder API and the regular expression supported by package java.util.regex, or the included HtmlParser library. It would be an interesting contribution. If you are not a Java developer, then a request for feature should be created in the Forge to induce someone in the community to commit such an enhancement, which is definitely something we need to have in CLIF.
Second question: the httpInjector is limited for each Injector forThere is no limit. I've already - and accidentally - been up to 12 millions virtual users with the HttpInjector on a single laptop (a crazy experiment!). How do you find such a limit? Just in case it helps: consider setting the thread pool size (see the section about ISAC execution engine in the user manual).a maximum of 200 users. Is there a reason for that?
Kind regards, -- Bruno.
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.