我如何处理 watir 脚本弹出的 rad 窗口?
我如何使用 watir 处理弹出的这种类型的 Rad 窗口。
<span id="RadWindowTitlectl00_ContentPlaceHolder1_rwmWinManager_rwMessage" class="RadWTitleText" onselectstart="return false;" unselectable="on">Check Results</span>
这是用于按钮 html...
<input id="btnOk" class="LoginButton" type="button" onclick="javascript:CallBackToEdit('1');" value="Ok">
请为此提供指导。
How can i handle this type of Rad window pop up by using watir.
<span id="RadWindowTitlectl00_ContentPlaceHolder1_rwmWinManager_rwMessage" class="RadWTitleText" onselectstart="return false;" unselectable="on">Check Results</span>
This is for button html...
<input id="btnOk" class="LoginButton" type="button" onclick="javascript:CallBackToEdit('1');" value="Ok">
Please give guidance for this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
需要更多信息来帮助您。
如果您尝试访问新生成的弹出窗口,请执行以下操作:
Need more info to help you.
If you're trying to access a newly generated popup window, do it something like this:
鉴于您提供的 HTML 似乎只是一个普通的 div 元素,我的第一个猜测是,这并不是真正的任何类型的弹出窗口,而只是一个使用 Ajax/javascript 和 CSS 来模拟弹出窗口效果的 div (通过操纵对象的颜色,也许还有“启用”状态,因此它看起来是模态的)
为了确保我们需要看到的不仅仅是 HTML 的片段,或者更好的是对页面示例的引用实现这个控制。了解哪一组“Rad”控件(因为 Telerik 有多个版本(Ajax、MS-MVC、Silverlight、WPF 和 Winforms)可用)并了解哪一个可以更轻松地找到控件示例也会很有帮助Telerik 网站上的演示页面
您提供的很少,我认为只需
注意,由于这件事很可能通过客户端脚本实现,因此可能是一个简短的 wait 可能需要在尝试单击对象之前确保该对象存在。
如果这对您不起作用,请使用开发人员工具查看按钮输入元素并确保它不在框架中。
否则,请向我们提供更多 HTML、具体是哪个 RAD 控件(这样我们也许可以在他们的演示中找到示例)或两者兼而有之。
Given that the HTML you have supplied just seems to be an ordinary div element, my first guess is that this is not truly any kind of popup, but just a div that is using Ajax/javascript and CSS to simulate the effect of a popup (by manipulating the coloring of objects, and perhaps the 'enabled' state as well so it appears to be modal)
To be sure we'd need to see more than just fragments of the HTML Or better yet a reference to an example of a page that implements this control. It would also be helpful to know WHICH set of 'Rad' controls (since Telerik has multiple versions (Ajax, MS-MVC, Silverlight, WPF and Winforms) available) and knowing which one might make it easier to find an example of the control on the demo pages at Telerik's site
based on what little you've provided I would think that simply
Note that since this thing could well be coming into existence via client side scripting, potentially a brief wait might be necessary to ensure that the object exists, before trying to click it.
If that does not work for you, then use developer tools to look at the button input element and make sure it is not in a frame.
Otherwise please give us either more HTML, specifics on which RAD control this is (so we can perhaps find an example among their demos) or both.