英文:
Handling Cloudflare captcha on Login form in Cypress Automated Test?
问题
我们最近在登录表单中添加了Cloudflare验证。我们通过API登录进行99%的测试,但仍然希望进行一些使用实际登录表单的测试,以便我们知道是否出现问题。我更新了测试以点击验证码,但它却陷入了循环中。有人以前处理过这个问题吗?
英文:
We recently added this Cloudflare verification to the login form. We login via API for 99% of our tests but still want a few tests that use the actual login form so we know if it's broken. I updated the test to click the captcha but it just get stuck in a loop. Has anyone dealt with this before?
答案1
得分: 2
I'm not sure it can be answered without giving a full-blown tutorial, but these references might be useful.
虚拟网站密钥和秘钥
以下虚拟网站密钥和秘钥可用于测试。
网站密钥 | 描述 | 可见性 |
---|---|---|
1x00000000000000000000AA | 始终通过 | 可见 |
2x00000000000000000000AB | 始终阻止 | 可见 |
1x00000000000000000000BB | 始终通过 | 不可见 |
2x00000000000000000000BB | 始终阻止 | 不可见 |
3x00000000000000000000FF | 强制交互式挑战 | 可见 |
秘钥 | 描述 |
---|---|
1x0000000000000000000000000000000AA | 始终通过 |
2x0000000000000000000000000000000AA | 始终失败 |
3x0000000000000000000000000000000AA | 产生“令牌已使用”错误 |
英文:
I'm not sure it can be answered without giving a full-blown tutorial, but these references might be useful.
Dummy sitekeys and secret keys
The following sitekeys and secret keys are available for testing.
Sitekey | Description | Visibility |
---|---|---|
1x00000000000000000000AA | Always passes | visible |
2x00000000000000000000AB | Always blocks | visible |
1x00000000000000000000BB | Always passes | invisible |
2x00000000000000000000BB | Always blocks | invisible |
3x00000000000000000000FF | Forces an interactive challenge | visible |
Secret key | Description |
---|---|
1x0000000000000000000000000000000AA | Always passes |
2x0000000000000000000000000000000AA | Always fails |
3x0000000000000000000000000000000AA | Yields a “token already spent” error |
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论