我在 Firefox 中使用 Selenium IDE 并提交表单。问题是表单可能成功或失败(随机)。当它不成功时,它会显示错误消息(AJAX),我需要尝试再次提交表单。
我想编写一个测试,它将提交表单,直到它将我重定向到成功页面(存在文本)。
有人可以帮我吗?我还没有以这种方式玩 Selenium。
我在 Firefox 中使用 Selenium IDE 并提交表单。问题是表单可能成功或失败(随机)。当它不成功时,它会显示错误消息(AJAX),我需要尝试再次提交表单。
我想编写一个测试,它将提交表单,直到它将我重定向到成功页面(存在文本)。
有人可以帮我吗?我还没有以这种方式玩 Selenium。
这是一个向 Selenium IDE 添加完整的循环、条件执行和可调用函数的扩展:SelBlocks。
Dave Hunt 提到了 flowControl,这是一种可能性。但除了更高级的功能外,一个显着的区别是 SelBlocks 采用 eval 表达式(常规 javascript),这可能会使检查 AJAX 状态更容易一些。
You can use selenium extension goto_sel_ide. This will enable flow control commands. Then you can use while command, and with help of this you can run script till you get success message. Let me know whether it is working for you or not