Selenium 平台特定吗?

发布于 2024-08-05 12:04:33 字数 79 浏览 2 评论 0原文

Selenium 平台是特定的吗?如果是,那么我如何通过首先识别平台然后调用特定于平台的 selenium 例程来使用它开发跨平台特定应用程序。

Is Selenium paltform specific. If yes then how can I develop a cross-platform specific application with it by first identifying the platform and then call the platform-specific selenium routines.

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

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

发布评论

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

评论(5

扛起拖把扫天下 2024-08-12 12:04:33

IDE 是一个 firefox 插件,但您可以使用多种语言开发测试,这些测试可以在多个平台(包括多个浏览器)上运行。不太确定你想要完成什么,但希望这会有所帮助。

The IDE is a firefox plugin, but you can develop tests in multiple languages, which run on and against multiple platforms (including multiple browsers). Not really sure what you're trying to accomplish, but hopefully that helps.

冧九 2024-08-12 12:04:33

Selenium 是平台无关的。这是因为您运行 Selenium RC 服务器(它是一个 java 应用程序,因此可以在任何平台上运行)。然后,您将 selenese 命令发送到控制浏览器上的测试活动的服务器。要发送 Selenese 命令,您可以使用任何语言(例如 Java、PHP、Ruby 等)。现在,这又不会以任何方式限制您使用某个操作系统。

如果您使用 Firefox 插件 IDE 来运行测试用例,那么支持的平台当然仅限于 Firefox 支持的平台。

希望能得到解答。

Selenium is platform independent. This is because you run a Selenium RC server (which is a java application and hence can be run on any platform). Then you send selenese commands to the server which controls the testing activity on the browser. To send the selenese commands you can use any language (such as Java, PHP, Ruby etc). Now this again does not limit you in any way to a certain OS.

If you are using the Firefox plugin IDE to run the test cases then of course the platforms supported would be limited to platforms supported by Firefox.

Hope that answers.

阳光的暖冬 2024-08-12 12:04:33

我可能误解了你的问题,但是:

使用 Selenium RC(或更具体地说是 Grid),你可以指定你想要测试运行的平台。每个节点在特定平台下向集线器注册,并且每个测试的DesiredCapability可以请求平台。

正如其他答案所述,Selenium 本身是独立于平台的,但您可以在按平台、按浏览器的基础上运行测试。无论哪种方式,测试(理论上)应该看起来相同并使用相同的本机 Selenium 命令。

I may be misunderstanding your question, but:

With Selenium RC (or Grid, more specifically), you can specify what platform you want your test to run on. Each node registers with the hub under a particular platform, and each test's DesiredCapabilities can request a platform.

As the other answers have stated, Selenium itself is platform independent but you can run your tests on a by-platform by-browser basis. Either way, the tests (in theory) should look the same and use the same native Selenium commands.

江湖正好 2024-08-12 12:04:33

我对 Selenium 不太熟悉,但在我看来,它几乎可以在任何可以安装 Firefox 2+ 的地方工作。

Selenium 支持的平台

I am not so familiar with Selenium, but it looks to me that it works almost everywhere where you can install Firefox 2+.

Platforms Supported by Selenium

可可 2024-08-12 12:04:33

我正在将 Selenium 用于在 Windows 和 Ubuntu 下运行的项目。唯一特定于平台的代码用于启动其执行环境(Ubuntu 下的无头 X 服务器)并启动 Selenium jar 文件。其余的都是独立于平台的。我不知道当您尝试使用不同的浏览器时这是否也能顺利工作(我在两个平台上都使用 Firefox)。

I'm using Selenium for a project that runs under Windows and Ubuntu. The only platform specific code is for starting the environment where it executes (headless X server under Ubuntu) and starting the Selenium jar file. The rest is all platform independent. I don't know if this will also work as smoothly when you try to use different browsers (I'm using Firefox on both platforms).

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