如何在 Selenium IDE 中运行嵌入页面的脚本?

发布于 2024-07-20 07:10:29 字数 206 浏览 6 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一曲琵琶半遮面シ 2024-07-27 07:10:29

有一个 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文