使用 Selenium IDE 的验证码 - 我可以做一个 'pause' 并要求 'user' 输入验证码吗

Captcha with Selenium IDE - can I do a 'pause' and ask the 'user' to enter the CAPTCA

我将 Selenium IDE 与我的 Firefox 浏览器扩展一起使用,它工作得很好,但我有一个使用验证码的注册表单 - 显然不可能让 Selenium 'read'验证码(如果这样做的话,它会变得有些无用)-但我需要修改我的测试以提醒用户他们应该在 x 秒内添加他们在屏幕上看到的验证码。

我不知道这是否可行 - 欢迎任何建议。

是的,这可以提醒用户输入验证码值。请在 Selenium IDE 中使用以下命令。

Command: storeEval
Target: prompt("Enter Captcha Value")
Value: var

这会提示您输入验证码值。您可以看到验证码,然后输入它。此提示值存储在 var 中。然后我在验证码字段中输入。

Command: type
Target: your captcha location
Value: ${var} 

如果没有验证码,还有另一种方法可以跳过此部分。请参考this link. You need to add the user extension js file to your Selenium IDE and then use gotoIf function. Eg: Refer my script here。如果该元素存在,这只会提示用户输入验证码。