我必须处理一个弹出窗口的 2 条警报消息,但它只验证一条警报。请参考下面的屏幕截图。
代码选项1:
Handle Alert * Country Description is required.* Currency is required. Leave
sleep 2
Handle Alert ACCEPT
代码:选项2:
Alert Should Be Present * Country Description is required. LEAVE
Alert Should Be Present * Currency is required. LEAVE
Handle Alert ACCEPT
我尝试了这两个选项,但它不起作用
1。您可以在一行中使用它,如
Alert Should Be Present <Whole text of your alert here>
2。或者,如果您第一次不确定如何从警报中提取预期文本,您可以在执行后从测试报告中获取它并复制预期消息/例如从 ${actual_message} 变量复制:
${actual_message} = Handle Alert LEAVE # Leave alert open and get its message.
Should be equal ${actual_message} * Country Descript...blah-blah