Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium IDE警报();测试失败_Selenium - Fatal编程技术网

Selenium IDE警报();测试失败

Selenium IDE警报();测试失败,selenium,Selenium,我正在使用Selenium IDE,当我发出警报时: Command: storeEval Target: alert("Please validate, then press OK!") 在我按下OK后,测试崩溃。此崩溃的日志为: [info] script is: alert("Please validate, then press OK!") [error] Threw an exception: [info] Test case failed 奇怪的是,有时工作正常,有时不正常。

我正在使用Selenium IDE,当我发出警报时:

Command: storeEval
Target: alert("Please validate, then press OK!")
在我按下OK后,测试崩溃。此崩溃的日志为:

[info] script is: alert("Please validate, then press OK!")
[error] Threw an exception: 
[info] Test case failed 

奇怪的是,有时工作正常,有时不正常。

也许你应该在验证警报之前添加睡眠或等待元素出现。您好,我发出了此警报,只是为了有时间检查某个地方,检查后我想继续测试,然后按OK