CharlesC wrote:Hey eValid...can you help me out?
I need to deliver keystrokes to an input field with random intervals between inputs.
A single burst (the whole string) or a regular rate won't work.
Any ideas?
Thanks
Thanks for asking CharlesC.
Sounds like you want to avoid indicating to the website in question that there is a "robot" doing the typing?
That raises some ethical (and maybe, legal) questions, but we'll leave that point alone for a while.
We'll just assume you are a "responsible tester".
The way to do this in eValid is to separate the letters in the input string and append them one at a time into the indicated field.
This may require use of Structural Testing and maybe some DOM modification actions, but let's assume you have the trick of appending one letter to the end of the input string in a FORM element [for example] understood.
How to you make the input arrive at random intervals?
That is the easy part here.
To do the random arrival you need to use one of two methods:
(1) Make a system call to create a random value, say $RANDOM, and then execute the command Wait $RANDOM.
(2) Put the command "WaitRandomUniform" in the script.
This command accepts two inputs: a lower value and an upper value.
The Wait commands waits a random time, choosing according to a uniform distribution of probability, from the range between the two values.
Since times in eValid are expressed in whole milliseconds, your command might look like this:
WaitRandomUniform 1234 5678
which says to wait a uniformly distributed number of milliseconds between 1234 msec and 5678 msec (1.234 sec to 5.678 sec).
-- eValid Support