如何控制 selenium 远程服务器调用的浏览器将在我的哪个桌面上弹出?
我正在使用 selenium 从 phpunit 运行测试。由于测试需要几分钟的时间,我想切换到另一个桌面并在测试在后台运行时执行一些任务。
但是,由于每个测试都通过 selenium 远程服务器调用新的浏览器,并且启动了新的测试管理窗口和应用程序窗口,因此这些新窗口不会出现在我启动 php 测试的桌面中,而是出现在我当前的桌面中焦点远离我正在工作的窗口。
如何控制浏览器始终在后台桌面(我启动 phpunit 的地方)中打开?我正在使用 Kubuntu,即 KDE 桌面。
感谢您的任何建议!
I am running tests from phpunit using selenium. Since the tests take a couple of minutes proceed, I would like to switch to another desktop and do some tasks while the tests are running in the background.
However, since every test calls a new browser via selenium remote server, and a new test management window and a application window are started, these new windows do not appear in the desktop which I started the php tests from, but in my current desktop taking the focus away from the window I am working in.
How can I control that the browsers are always opens in the desktop that is in the background (where I start phpunit)? I am using Kubuntu i.e. the KDE Desktop.
Thanks for any suggestions!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能有点晚了,但对于阅读本文的任何人来说:当您启动 selenium RC 服务器时,您可以尝试使用以下命令导出到特定显示器:
使用此命令,您还可以将其导出到例如 X 虚拟帧缓冲区( Xvfb),有效地在后台运行它。
This is probably a bit late, but for anyone reading this: When you launch your selenium RC server, you could try exporting to a specific display using the command:
Using this, you could also export it to for instance an X virtual frame buffer (Xvfb), effectively running it in the background.