Repository navigation
Description
What I did
Cold-start run against current master (5f9ab3d, i.e. #66 zero-config included), built locally and installed under a throwaway version. Fresh Maven project outside the repo, following docs-site/docs/getting-started.md and skipping Step 2, which is titled "Step 2 — Configuration file (optional)" and says the file can be omitted entirely.
Files: the README quickstart pom.xml, the Step 3 SmokeTest copied verbatim, the Step 4 testng.xml, no selenium-boot.yml anywhere.
public class SmokeTest extends BaseTest {
@Test
public void opensThePage() {
open(); // navigates to baseUrl
assertThat(getByRole(Role.HEADING, "Example Domain")).isVisible();
}
}mvn test
What happened
Bootstrap is fine — the zero-config notice prints and Chrome starts:
[Selenium Boot] No selenium-boot.yml found — running with built-in defaults (chrome, local, timeouts.explicit=10s, timeouts.pageLoad=30s). Add a selenium-boot.yml to customise.
[Selenium Boot] Parallel execution disabled.
[Selenium Boot] Active sessions: 1
Then the test fails:
[ERROR] SmokeTest.opensThePage:9->BaseTest.open:67 » IllegalState baseURL is null or empty
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO] BUILD FAILURE
There is no default execution.baseUrl, and neither open() nor open(String path) can navigate without one — open(String) treats its argument as a path appended to baseUrl and throws the same IllegalStateException. So with no yml there is no BaseTest navigation API that works; the only way through is to drop to getDriver().get("https://example.com"), which does pass:
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] BUILD SUCCESS
The mismatch
Step 2 is labelled optional, but Step 3 says "Copy this as-is — it passes against the baseUrl from Step 2 with a real Chrome, no changes needed", and the "Project structure" section shows selenium-boot.yml # optional — omit to run on built-in defaults. A first-timer who takes the page at its word — skip the optional step, copy the test, run — gets a browser launch followed by a red build. The two statements can't both be true of the same walkthrough.
Secondary: the failure gives a first-timer nothing to act on. IllegalStateException: baseURL is null or empty never mentions selenium-boot.yml or execution.baseUrl, and the notice line advertises the defaults without mentioning that open() still needs a base URL. Compare the (good) message the same user gets on 3.4.0: "Configuration file 'selenium-boot.yml' not found. Checked: -Dselenium.boot.config, working directory, and classpath."
Suggested fix
Docs, one of:
- Keep Step 2 optional but make the Step 3 sample work without it (navigate to an absolute URL), and show the yml as the way to stop repeating the URL; or
- Say plainly in Step 2 that omitting the file works but leaves
baseUrlunset, so the Step 3 example specifically needs the file — i.e. optional for the framework, required for this walkthrough.
Optionally, in the framework: have open()'s message name the missing key, e.g. baseURL is not set — add execution.baseUrl to selenium-boot.yml, or navigate with getDriver().get(url). That is a message-only change, no behavior change.
Environment
Ubuntu, Java 25 (project on maven.compiler.release 17), Maven 3.8.7, Chrome 153.0.8010.52, selenium-boot built from master 5f9ab3d. Related: #76 (the docs pin 3.4.0, which does not have zero-config at all).
Activity
Merge pull request #78 from seleniumboot/fix/77-basurl-message