【问题标题】:How to run a script embedded in the page in Selenium IDE?如何在 Selenium IDE 中运行嵌入页面中的脚本?
【发布时间】:2009-05-18 11:58:28
【问题描述】:

我正在使用Selenium IDE 测试一个页面,并希望执行该页面中已有的方法。我试过getEval(window.name.space.function()) 但它只是返回window.name 是未定义的。这可能吗?

【问题讨论】:

    标签: javascript testing selenium embedded-resource execute


    【解决方案1】:

    有一个 getCurrentWindow() 函数,由于深不可测的原因,它只允许您访问“安全”属性(这应该防止什么?人们恶意地对其他人的网站进行路过测试?)。较新的版本提供了解决这些问题的 getUserWindow() 函数。详情请见this blog entrythis issue

    【讨论】:

      猜你喜欢
      • 2011-05-21
      • 2022-01-06
      • 1970-01-01
      • 2023-04-06
      • 1970-01-01
      • 2012-02-13
      • 2018-07-25
      • 2014-09-02
      • 2021-09-10
      相关资源
      最近更新 更多