关注由 select_list 值生成的窗口
我正在测试的网站有一个页面,当 选择指定的 select_list 值。迄今为止,我从来没有能够 自动化此操作,多年来我一直将其作为手动步骤 直到我能弄清楚。 select_list 的 HTML 示例 问题是这样的:
<select name="cboFoo" class="txtboxwidth left" id="cboFoo"
onchange="javascript:setTimeout('__doPostBack(\'cboFoo\',\'\')', 0)"
jQueryXXXXXXXXXXXXXXXXXXXX="7">
考虑到 click_no_wait 在我们网站的其他地方工作得足够好 对于 javascript 确认等,我希望以下内容 为 select_list 工作;但事实并非如此。新的数据窗口从未 出现:
browser.select_list(:id, "cboFoo").select_no_wait("Bar")
我欢迎任何建议,因为这是目前我们唯一的领域 我无法自动化的网站。
谢谢,
GJHmf
The site I'm testing has a page that spawns a new data window when a
specified select_list value is chosen. To date, I've never been able
to automate this, and I've been having this as a manual step for ages
until I can figure it out. Example HTML for the select_list in
question is as such:
<select name="cboFoo" class="txtboxwidth left" id="cboFoo"
onchange="javascript:setTimeout('__doPostBack(\'cboFoo\',\'\')', 0)"
jQueryXXXXXXXXXXXXXXXXXXXX="7">
Considering a click_no_wait works well enough elsewhere in our site
for javascript confirmations and suchlike, I hoped the following would
work for a select_list; but it doesn't. The new data window never
appears:
browser.select_list(:id, "cboFoo").select_no_wait("Bar")
I welcome any suggestions, as this is currently the only area of our
site I can't automate.
Thanks,
GJHmf
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于控件正在寻找“onchange”事件,因此您可能需要进行选择,然后针对该元素触发该事件以调用 javascript。
如果不是这样,请按照问题评论中的要求提供更多信息。
Since the control is looking for an 'onchange' event, you may need to make your selection and then fire that event against that element to get the javascript to invoke.
If that's not it, then please provide more info as requested in the comments to the question.