Handle CAPTCHA with auth0 login with playwright TypeScript code

Hi Team,

I’m automating end-to-end tests for a web application login flow using Playwright with TypeScript. The login is handled via Auth0 Universal Login, but I’m running into issues because CAPTCHA often appears during the login process, blocking my automation. I need to execute these tests in test and live environments.

I’m looking for best practices or recommended approaches to handle or bypass CAPTCHA in this scenario.

Hi @achinimeekandawattag,

Welcome to the Auth0 Community!

The most straightforward way of avoiding CAPTCHA is to set “never” in Bot Detection for options that specify “Choose when to require CAPTCHA”.

Otherwise you can also specify a list of IPs for your test users that can be added in the IP AllowList field. This would Allow trusted IP addresses to bypass Bot Detection, so I would recommend checking this documentation for more information on the matter.

Thanks,
Remus

Hi @remus.ivan , Thanks for the response. May I know whether there’s any option to disable bot detection only for a set of test users. I need to execute the test in live environments as well. Therefore, I would like to know the feasibilty of having any approach to manage a set of users.

Hi @achinimeekandawattag,

Bot detection is a feature applied at the tenant level and unfortunately there is no out of the box solution for disabling it for just a particular set of users, so the current recommended way would be the one specified above.

Otherwise, implementing such a functionality could be a good idea, so you can create a feature request, segment that is constantly reviewed by our product team and if it gets multiple votes it might get considered sooner than later.

Best regards,
Remus