0
A
回答
1
StoreAlert的OK按钮,然后点击StoreConfiramtion
storeAlert
Returns:
The message of the most recent JavaScript alert
Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
storeConfirmation
Returns:
the message of the most recent JavaScript confirmation dialog
Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
相关问题
- 1. 如何在Selenium IDE的css路径中包含存储值?
- 2. 将已存储的变量存储在Selenium IDE中
- 3. javascript alert message russian text
- 4. 如何将存储值发送到Selenium IDE中的文件
- 5. 在selenium ide中存储html源代码或变量的内容?
- 6. Selenium IDE中的输入值和存储的变量文本之间的AssertText
- 7. Selenium IDE中的storeValue
- 8. Selenium IDE - Javascript Alert,请按Enter,使用哪个目标?
- 9. Selenium IDE - 数组增加值
- 10. Selenium IDE递减值var
- 11. 如何使用selenium IDE存储除货币符号之外的金额值?
- 12. Selenium IDE javascript单击元素如果存储变量=是
- 13. 如何在Firefox 45.0中安装Selenium IDE(selenium-ide-2.9.0.xpi)?
- 14. 如何在selenium IDE中存储动态文本值并在以后的不同窗口中使用
- 15. Selenium IDE中的棘手环
- 16. Selenium IDE中的变量
- 17. 在Selenium中,“list”类型的方法FindElement存储值
- 18. JSON的值 - coords @ canvas - Selenium IDE&Selblocks
- 19. Selenium IDE storelocation然后拆分并保存分隔符前的值
- 20. 硒IDE存储的可变
- 21. Selenium IDE使用storeXpathCount包含在xpath中
- 22. Selenium IDE iframe
- 23. Selenium IDE - results.html
- 24. 使用Selenium IDE
- 25. 如何验证Selenium IDE中存在的代码片段?
- 26. 在Selenium IDE中使用waitForCondition(script,timeout)
- 27. 在Selenium IDE中,如何获取基址的值
- 28. 如何在Selenium IDE中使用selectAndWait?
- 29. 如何在Selenium IDE中确实存在<a>标签
- 30. Selenium IDE:未保存基本网址
阅读storeAlert文档的最后2段。如果您看到警告消息,则表示您卡住了。 Selenium必须为加载的每个页面重新定义window.alert,以拦截该功能以使其自动化。如果页面在页面加载事件之前提醒消息,Selenium没有这种机会。 (假设本地window.alert,而不是一个JS小部件。) –