使用selenium-maven-plugin的问题

发布于 2024-09-08 17:21:46 字数 2395 浏览 5 评论 0原文

我正在使用 selenium-maven-plugin。 http://mojo.codehaus.org/selenium-maven-plugin/ 我尝试过以 xvfb 为目标的无头 Linux。 下面执行进度...

  1. xvfb
  2. start-server (Selenium RC 服务器)
  3. 运行单元测试
  4. stop-server

但是,在 3 处,不工作...

16:34:50,532 INFO  [org.openqa.selenium.server.SeleniumServer] Java: Sun Microsystems Inc. 14.3-b01
16:34:50,532 INFO  [org.openqa.selenium.server.SeleniumServer] OS: Linux 2.6.18-128.el5xen i386
16:34:50,541 INFO  [org.openqa.selenium.server.SeleniumServer] v2.0 [a2], with Core v2.0 [a2]
...
16:34:50,636 INFO  [org.openqa.jetty.http.HttpServer] Version Jetty/5.1.x
16:34:50,637 INFO  [org.openqa.jetty.util.Container] Started HttpContext[/selenium-server/driver,/selenium-server/driver]
16:34:50,637 INFO  [org.openqa.jetty.util.Container] Started HttpContext[/selenium-server,/selenium-server]
16:34:50,638 INFO  [org.openqa.jetty.util.Container] Started HttpContext[/,/]
16:34:50,659 INFO  [org.openqa.jetty.util.Container] Started org.openqa.jetty.jetty.servlet.ServletHandler@1462851
16:34:50,659 INFO  [org.openqa.jetty.util.Container] Started HttpContext[/wd,/wd]
16:34:50,663 INFO  [org.openqa.jetty.http.SocketListener] Started SocketListener on 0.0.0.0:4444
16:34:50,664 INFO  [org.openqa.jetty.util.Container] Started org.openqa.jetty.jetty.Server@122cdb6
16:34:51,279 INFO  [org.openqa.jetty.util.Credential] Checking Resource aliases
Selenium Server started
[INFO] [surefire:test {execution: default}]
...

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
...
16:34:53,023 INFO  [org.openqa.jetty.util.Credential] Checking Resource aliases
16:34:53,027 INFO  [org.openqa.selenium.server.SeleniumDriverResourceHandler] Command request: setSpeed[500, ] on session null
16:34:53,031 INFO  [org.openqa.selenium.server.SeleniumDriverResourceHandler] Got result: OK on session null
...
16:34:53,040 INFO  [org.openqa.selenium.server.BrowserSessionFactory] creating new remote session
...
16:34:53,154 INFO  [org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher] Preparing Firefox profile...
16:35:02,393 INFO  [org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher] Launching Firefox...

不超过,没有进度... 有人知道吗?

谢谢。

I'm using selenium-maven-plugin.
http://mojo.codehaus.org/selenium-maven-plugin/
I have tried at headless linux with xvfb goal.
Below execution progress...

  1. xvfb
  2. start-server (Selenium RC server)
  3. run unit test
  4. stop-server

But, at 3, not working...

16:34:50,532 INFO  [org.openqa.selenium.server.SeleniumServer] Java: Sun Microsystems Inc. 14.3-b01
16:34:50,532 INFO  [org.openqa.selenium.server.SeleniumServer] OS: Linux 2.6.18-128.el5xen i386
16:34:50,541 INFO  [org.openqa.selenium.server.SeleniumServer] v2.0 [a2], with Core v2.0 [a2]
...
16:34:50,636 INFO  [org.openqa.jetty.http.HttpServer] Version Jetty/5.1.x
16:34:50,637 INFO  [org.openqa.jetty.util.Container] Started HttpContext[/selenium-server/driver,/selenium-server/driver]
16:34:50,637 INFO  [org.openqa.jetty.util.Container] Started HttpContext[/selenium-server,/selenium-server]
16:34:50,638 INFO  [org.openqa.jetty.util.Container] Started HttpContext[/,/]
16:34:50,659 INFO  [org.openqa.jetty.util.Container] Started org.openqa.jetty.jetty.servlet.ServletHandler@1462851
16:34:50,659 INFO  [org.openqa.jetty.util.Container] Started HttpContext[/wd,/wd]
16:34:50,663 INFO  [org.openqa.jetty.http.SocketListener] Started SocketListener on 0.0.0.0:4444
16:34:50,664 INFO  [org.openqa.jetty.util.Container] Started org.openqa.jetty.jetty.Server@122cdb6
16:34:51,279 INFO  [org.openqa.jetty.util.Credential] Checking Resource aliases
Selenium Server started
[INFO] [surefire:test {execution: default}]
...

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
...
16:34:53,023 INFO  [org.openqa.jetty.util.Credential] Checking Resource aliases
16:34:53,027 INFO  [org.openqa.selenium.server.SeleniumDriverResourceHandler] Command request: setSpeed[500, ] on session null
16:34:53,031 INFO  [org.openqa.selenium.server.SeleniumDriverResourceHandler] Got result: OK on session null
...
16:34:53,040 INFO  [org.openqa.selenium.server.BrowserSessionFactory] creating new remote session
...
16:34:53,154 INFO  [org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher] Preparing Firefox profile...
16:35:02,393 INFO  [org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher] Launching Firefox...

No more than, not progress...
Anybody knows?

Thanks.

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

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

发布评论

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

评论(1

ぇ气 2024-09-15 17:21:46

打开日志记录并设置超时,然后检查日志是否有错误。
该问题可能是由于selenium 无法找到或打开firefox 引起的。

Turn on logging and set a timeout, then check the log for errors.
The problem may be caused by selenium not being able to find or open firefox.

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