硒-"Firefox已在运行"错误 [英] Selenium - "Firefox is already running" error

查看:96
本文介绍了硒-"Firefox已在运行"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用硒进行一些测试.我们为此专用Windows XP VM,每个VM上都有一台硒RC服务器,而该VM上没有其他进程在运行.我们为每个测试打开和关闭硒会话.测试完成时总是调用selenium.stop().很多时候(每30个中就有1个)挂起一个测试,当我查看已分配给它的计算机的桌面时,会看到一个弹出窗口,显示"Firefox已在运行,但没有响应.打开一个新窗口,您必须首先关闭现有的Firefox进程,或重新启动系统."

We are running some tests using selenium. We have dedicated Windows XP VM's for that, with one selenium RC server on each VM, and no other process running on that VM. We open and close a selenium session for each test. The tests always call selenium.stop() when they finish. A lot of times (1 in 30 I would say) one test hangs, and when I view the desktop of the machine that has been allocated to it I see a popup with "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system."

  • 我确定只有一项测试可以传达 在给定时间使用虚拟机
  • 所有测试都确保完成后停止stop()硒.
  • 我们的日志记录非常冗长, 日志显示没有任何测试 测试之前的问题 "firefox已经在运行"错误.
  • 得到此错误的测试是 任意的,因为它发生的正确 在调用selenium.start()之后 因此不是由任何特定原因引起的 代码.
  • 所有测试的拆卸都相同
  • I am sure only one test communicates with a VM at a given time
  • All tests make sure to stop() the selenium when they're done.
  • we have very verbose logging, and the log shows that no test had any problems before the test that got the "firefox is already running" error.
  • The test that gets this error is arbitrary, since it happens right after calling selenium.start() and thus isn't caused by any specific code.
  • The teardown is the same for all tests

可能是什么原因导致的,如何预防?

What could be causing this, and how can I prevent it?

推荐答案

我们发现在我们的案例中,这样做的原因与硒完全无关-firefox本身就遇到了麻烦,因为它运行在CPU不足的计算机上和/或RAM.我们升级了虚拟机(例如增加了更多的RAM和CPU),问题几乎完全消失了.

We have found that in our case the reason for this was completely unrelated to selenium - firefox itself was just having trouble because it was running on machines with not enough CPU and\or RAM. We upgraded the VM's (e.g added more RAM and CPU) and the problem went away almost completely.

这篇关于硒-"Firefox已在运行"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆