How to Enter Captcha data with phpunit test -
is possible enter captcha information phpunit tests?
something like
$this->type("recaptcha_reponse_field", "information inside");
i understand captcha created prevent kind of things, i'm sure some1 out there once had test system automatically needs captcha information before submiting form.
thanks d~~~
you can't that, unless ocr captcha image. no longer test :)
usually kind of bypass implemented on server side. in pseudocode like:
if ($config->bypass_captcha) { if ($recaptcha_response_field == 'correct') { // happens after submit } else { // happens on incorrect captcha } } else { // call recaptcha api perform real check }
then need ensure "bypass_captcha" never enabled on on public servers.
of course, there other ways - disabling captcha check given ip address (that belongs host run test from)
Comments
Post a Comment