selenium-ide 将变量从测试套件传递到测试

发布于 2024-09-15 07:29:55 字数 179 浏览 1 评论 0原文

有什么方法可以将变量从套件传递到 selenium ide 中的测试吗?我需要在测试进行到一半时更改 baseURL,并且我希望能够为

我尝试使用 storeEval 并以这种方式设置的所有测试进行一次设置。

我猜唯一的方法可能是创建一个 userExtension 并在那里设置变量

有想法吗?

Is there any way to pass a variable from the suite to the test in selenium ide? I need to have change the baseURL half way through my tests and I'd like to be able to set that once for all the tests

I've tried using storeEval and setting it that way.

I'm guessing the only way might be to create a userExtension and set the variable there

Thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

南汐寒笙箫 2024-09-22 07:29:55

虽然这确实是一个应该通过迁移到 Selenium-RC 来解决的问题,但您可能想看看数据驱动插件 http://wiki.openqa.org/display/SEL/datadriven。这使您可以提供包含要在测试中使用的数据的 XML 文件。

While this is really a problem that should be solved by moving to Selenium-RC, you may want to take a look at the Data Driven plugin http://wiki.openqa.org/display/SEL/datadriven. This lets you supply an XML file with data to be used in tests.

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