I have a while controller that waits for a certain regular expression to appear in the response before logging the user out. However, due to timeouts with the previous request this will occasionally enter into an infinite loop, skewing the data. I'm looking to set this request so that it only sends 5 times before exiting the loop and logging the user out.
After searching for an answer it seems that either the ${__counter()} variable or Counter Config Element are the solution, but neither seem to be working as I would expect.
Here is what I've got so far:
----While Controller (${__javaScript( "${DONE_A}" != "Thank you for your order" || ${counter} < 5;)}
--------Counter (set to 5, increment 1)
--------Constant Timer (2000 ms)
--------GET /checkout/confirmation
-----------^RegExp Extractor (DONE)
--Logout
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire