开发者

How to handle popup messages thrown from web applications in vb.net?

I am developing a tool to automate testing of a web application. I want to handle the popup messages thrown in error scenarios. The problem am facing is after a button click a popup message is thrown, but only af开发者_StackOverflow中文版ter a response is given to the message box(ie clicking on any buttons in the message box) the execution continues, till then the web browser is busy waiting for a response. Please suggest.


You could have your application inject some javascript into the page that overrides the default alert/confirm function. This would allow you to run code before the alert is shown or completely override the functionality so that the alert isn't shown at all.

See this custom alert demonstration for an easy example of how to override the default alert function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜