在Cypress自动化测试中处理Cloudflare登录表单上的验证码?

huangapple go评论83阅读模式
英文:

Handling Cloudflare captcha on Login form in Cypress Automated Test?

问题

我们最近在登录表单中添加了Cloudflare验证。我们通过API登录进行99%的测试,但仍然希望进行一些使用实际登录表单的测试,以便我们知道是否出现问题。我更新了测试以点击验证码,但它却陷入了循环中。有人以前处理过这个问题吗?

在Cypress自动化测试中处理Cloudflare登录表单上的验证码?

英文:

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?

在Cypress自动化测试中处理Cloudflare登录表单上的验证码?

答案1

得分: 2

I'm not sure it can be answered without giving a full-blown tutorial, but these references might be useful.

Turnstile Overview

在Cypress自动化测试中处理Cloudflare登录表单上的验证码?

Testing

虚拟网站密钥和秘钥
以下虚拟网站密钥和秘钥可用于测试。

网站密钥 描述 可见性
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.

Turnstile Overview

在Cypress自动化测试中处理Cloudflare登录表单上的验证码?

Testing

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

huangapple
  • 本文由 发表于 2023年6月13日 09:56:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76461269.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定