使用 Perl 配置 Selenium RC

发布于 2024-09-06 18:00:23 字数 67 浏览 1 评论 0原文

我想将 Selenium RC 与 Perl 客户端驱动程序一起使用。如何使用 Perl 配置 Selenium RC?

I want to use Selenium RC with a Perl client driver. How can I configure Selenium RC with Perl?

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

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

发布评论

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

评论(2

沦落红尘 2024-09-13 18:00:23

使用 WWW::Selenium 模块进行链接最高可达 Selenium RC。

您需要让 Selenium RC 在后台运行才能运行。
我发现从 Perl 中启动它有用的一种技术是在单独的线程上执行它,然后立即分离它:

use threads;

my $seleniumThread = # Assumes that your Selenium RC file is in the current dir
   threads->create( sub { system "java -jar selenium-server.jar"; } );

$seleniumThread->detach;
# Avoids the main program from having to wait for the system call to end

以下问题也可能有用:

Use the WWW::Selenium module to link up to Selenium RC.

You will need to have Selenium RC running in the background in order for it to operate.
A technique that I have found useful to launch it from within Perl is to execute it on a separate thread and then immediately detach it:

use threads;

my $seleniumThread = # Assumes that your Selenium RC file is in the current dir
   threads->create( sub { system "java -jar selenium-server.jar"; } );

$seleniumThread->detach;
# Avoids the main program from having to wait for the system call to end

The following question may be useful as well:

世界如花海般美丽 2024-09-13 18:00:23

请注意...对于 Selenium 2.0,您需要使用 Selenium::Remote::Driver 模块; WWW:Selenium 适用于 1.0。

来自 Selenium 文档 (http://seleniumhq.org/docs/03_webdriver.html):

Perl 绑定由第三方提供,请参阅他们的任何有关如何安装/开始的文档。截至撰写本文时,存在一种已知的 Perl 绑定。 [链接到 https://metacpan.org/module/Selenium::Remote ::驱动程序]

Just a heads-up... for Selenium 2.0, you'll want to use the Selenium::Remote::Driver module instead; WWW:Selenium is for 1.0.

From the Selenium docs (http://seleniumhq.org/docs/03_webdriver.html):

Perl bindings are provided by a third party, please refer to any of their documentation on how to install / get started. There is one known Perl binding as of this writing. [with a link to https://metacpan.org/module/Selenium::Remote::Driver]

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