如何在Selenium IDE中为隐藏警报编写断言

时间:2014-06-24 19:12:35

标签: selenium-ide

我必须在Selenium IDE中声明一个隐藏的警报。 IDE建议的命令失败。下面提到的是错误消息的html标记。谢谢你的帮助!

    <article class="alertify-log alertify-log-error alertify-log-show alertify-log-   hide">ERROR: User name and password doesn't match. Please try again.</article>

1 个答案:

答案 0 :(得分:0)

断言文章存在:

<tr>
    <td>assertElementPresent</td>
    <td>css=article[class*='hide'][class*='alertify-log-error']</td>
    <td></td>
</tr>

断言文本存在:

<tr>
    <td>assertText</td>
    <td>css=article[class*='hide'][class*='alertify-log-error']</td>
    <td>ERROR: User name and password doesn't match. Please try again.</td>
</tr>