Selenium - [错误]错误:有一个意外的确认

时间:2013-05-29 11:44:27

标签: selenium selenium-ide confirm

我有一个删除链接并确认但我在SeleniumIDE中一直收到错误

[error] There was an unexpected Confirmation
[Are you sure you want to delete all data and schedules for QA__run?]

我之前尝试过添加chooseOkOnNextConfirmation,但它没有任何区别,我仍然得到错误。

删除链接背后的HTML是:

<a class="deleteicon" title="Delete QA__run" rel="nofollow" 
data-method="delete" data-confirm="Are you sure?" href="/districts/83">
  <img src="/assets/icons/delete-a77f3c....png" alt="Delete"></img>
</a>

看起来像:

enter image description here

1 个答案:

答案 0 :(得分:1)

在删除行脚本后的selenium ide中,添加此命令

<tr>
    <td>storeConfirmation</td>
    <td>Are you sure you want to delete all data and schedules for QA__run?</td>
    <td></td>
</tr>