如何在 Selenium IDE 中运行嵌入页面的脚本?
我正在使用 Selenium IDE 测试页面,并希望执行页面中已有的方法。 我尝试过 getEval(window.name.space.function()) 但它只是返回 window.name is undefined 。 这可能吗?
I'm testing a page with Selenium IDE and want to execute a method already in the page. I've tried getEval(window.name.space.function())
but it just returns window.name
is undefined. Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个 getCurrentWindow() 函数,由于不可理解的原因,它只允许您访问“安全”属性(这应该防止什么?人们恶意地对其他人的网站进行路过测试?)。 较新的版本提供了 getUserWindow() 函数来解决这些问题。 请参阅此博客文章和此问题了解详细信息。
There is a getCurrentWindow() function which for unfathomable reasons only allows you to access "safe" properties (what is this supposed to protect against? people maliciously doing drive-by testing of other people's website?). Newer versions offer a getUserWindow() function that solves those issues. See this blog entry and this issue for details.