我试图使用selenium RC C#函数getAlert()捕获警报,因为单击按钮时检查帐户ID的可用性。表单将从一个框架提交给服务器,比如说frame_A,服务器将通过JavaScript代码alert(帐户可用)响应到另一个名为frame_B的框架中,但不知何故,selenium getAlert()不能检测到警报的存在。
一直在寻找解决方案,但到目前为止还没有找到它。
任何帮助,将不胜感激。
谢谢
解决方案你尝试使用selectFrame(frameId)方法尝试getAlert()之前选择iframe? 我不确定这是否能解决您的问题,但值得一试。谢谢
I am trying to capture the alert using selenium RC C# function getAlert() as a result of checking the availability of an account ID when the button is clicked. The form will be submitted to the server from one frame let's say "frame_A" and the server will response by javascript code "alert("The account is available")" into another frame called "frame_B" but somehow the selenium getAlert() cannot detect the existence of the alert.
Have been looking for solutions, but so far have not found it.
Any help, will be greatly appreciated.
Thanks
解决方案Have you tried selecting the iframe before trying to getAlert() using selectFrame(frameId) method? I am not sure if this will solve your problem but worth giving a try. Thanks
更多推荐
Selenium无法在iframe中引发警报
发布评论