Whenever I run a SeleniumRC script (using Ruby's selenium-client), the Firefox instance opens in front of al开发者_如何学Gol my other windows. This is a bit annoying. Is there a way to make it run behind my focused window?
If you are on Linux you can use XVFB and then tell Selenium to use the new virtual display.
More details can be found here but essentially its
- startx --
which Xvfb
:1 -screen 0 1024x768x24 2>&1 >/dev/null & - DISPLAY=:1 java -jar selenium-server.jar
If you are on windows you can use the desktops tool which provides you with multiple desktops which you can switch between. With that tool installed you can start RC on a different desktop and firefox won't be launched on your primary desktop anymore.
精彩评论