如何在 Selenium RC 中执行 Javascript

发布于 2024-09-30 06:13:03 字数 360 浏览 0 评论 0原文

我可以通过RC执行html脚本和html套件。现在我想通过 Selenium RC 执行 javascript。我有几个与此相关的问题。

  1. 我需要为此设置类路径吗?
  2. 用javascript编写测试脚本后,javascript套件的格式是什么。请提供示例。
  3. 从命令提示符执行该套件的注释是什么?我认为我用来执行 html suite 的命令可能不起作用。我使用的命令 java -jar selenium-server.jar -multiwindow -javaSuite "*iexplore" "http://www.google.co.in/" "C:\Tests_suite.html" "C:\results.html"

I can execute html script and html suite through RC. Now I would like to execute javascript through Selenium RC. I have few question related to this.

  1. Should I need to set class path for that?
  2. After writing test script in javascript, what is the format of javascript suite. Please provide example.
  3. What will be the comment to execute the suite from command prompt? I think the command I used to execute html suite may not work. The command I used java -jar selenium-server.jar -multiwindow -javaSuite "*iexplore" "http://www.google.co.in/" "C:\Tests_suite.html" "C:\results.html"

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

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

发布评论

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

评论(1

遇见了你 2024-10-07 06:13:03

我使用带有 Selenium RC id 的 Javascript 来使用 用户扩展

有一些信息。 这里也是如此。

或者您可以使用selenium API的 getEval 方法从 Selenium RC 执行 Javascript。

请记住在命令行中添加:

-userExtensions :表示将加载的 JavaScript 文件
变成硒

The way I've used Javascript with Selenium RC id to use the User extensions.

There's some info. here as well.

Or you can use the getEval method of selenium API to execute Javascript from Selenium RC.

From the command line, remember to add:

-userExtensions : indicates a JavaScript file that will be loaded
into selenium

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