Skip to content

Instantly share code, notes, and snippets.

@freynaud
Created June 15, 2011 11:49
@Override
public void beforeSession(TestSession session) {
super.beforeSession(session);
// find a free display.
int x = getFreeDisplay();
if (x == -1) {
log.warn(getVm().getName() + "Error routing the test");
return;
}
if (session.getRequestedCapabilities().get("browserName").equals("chrome")) {
session.getRequestedCapabilities().put("chrome.switches", new String[] { "--display=:" + x });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment