Selenium IDE:如何弹出对话框并等待用户单击"确定"

Xia*_*ang 3 selenium selenium-ide

只是想知道在运行selenium场景时我们是否可以做类似下面的事情,这需要用户的互动才能继续.喜欢等他上传一些图片..

  1. 直到这一步,selenium弹出一个对话框说:请完成一些事情,然后单击确定按钮继续.

  2. 当用户在网页上完成操作时,单击"确定",然后场景的事务正在向前移动.否则,停止该步骤.

对于第一颗子弹,我在想下面的命令:

命令:

waitForConfirmation
Run Code Online (Sandbox Code Playgroud)

目标:

javascript{confirm("Please upload the images, then click OK to continue")}
Run Code Online (Sandbox Code Playgroud)

提前致谢!

Ank*_*ain 5

在selenium中使用storeeval命令,不同类型的框

COMMAND   |    TARGET                                            | VALUE
----------------------------------------------------------------------------
storeeval | alert("This is alert box")                           |
storeeval | prompt("This is prompt box. Please enter the value") | text
storeeval | confirm("this is cofirm box")                        |
Type      | locator of text box                                  | ${text} 
Run Code Online (Sandbox Code Playgroud)