Skip to content

Commit 501b325

Browse files
committed
Provide a better error message when the htmlsuite runner is not available.
This addresses issue #2616.
1 parent c829ac8 commit 501b325

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

java/server/src/org/openqa/grid/selenium/GridLauncherV3.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,15 @@ private static GridItemLauncher buildLauncher(String[] args) {
9999

100100
for (int i = 0; i < args.length; i++) {
101101
if (args[i].equals("-htmlSuite")) {
102-
GridItemLauncher launcher = LAUNCHERS.get("corerunner").get();
102+
Supplier<GridItemLauncher> launcherSupplier = LAUNCHERS.get("corerunner");
103+
if (launcherSupplier == null) {
104+
System.err.println(
105+
"Unable to find the HTML runner. This is normally because you have not downloaded " +
106+
"or made available the 'selenium-leg-rc' jar on the CLASSPATH. Your test will " +
107+
"not be run.");
108+
return null;
109+
}
110+
GridItemLauncher launcher = launcherSupplier.get();
103111
launcher.setConfiguration(args);
104112
return launcher;
105113
}

0 commit comments

Comments
 (0)