From 1bce41691b484f7647ea36586843a832fe0e0c2e Mon Sep 17 00:00:00 2001 From: mikhail Date: Mon, 21 Sep 2026 11:44:38 +0300 Subject: [PATCH] docs: show that a browserless navigation location takes a query string navigate("order/ORD-1?tab=history", OrderView.class) used to fail with "Base path can not contain query separator=?". The mocked UI now parses the location the way Flow does, so the query parameters reach the view. Documents the supported form and says which navigate() argument carries route template parameters instead. Co-Authored-By: Claude Opus 5 (1M context) --- articles/flow/testing/browserless/getting-started.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/articles/flow/testing/browserless/getting-started.adoc b/articles/flow/testing/browserless/getting-started.adoc index 33304caeab..535713c317 100644 --- a/articles/flow/testing/browserless/getting-started.adoc +++ b/articles/flow/testing/browserless/getting-started.adoc @@ -200,6 +200,15 @@ To navigate to another registered view, use the [methodname]`navigate()` methods + [methodname]`navigate("template/myParam", Template.class)` +[since:com.vaadin:vaadin@V25.3]#The location is written the way it appears in the browser's address bar, so it can carry a query string and a fragment#: + +[source,java] +---- +OrderView view = navigate("order/ORD-1?tab=history", OrderView.class); +---- + +The view reads those query parameters from the navigation event, as it does in a running application. The map that [methodname]`navigate(Template.class, Map)` takes holds route template parameters instead, so a query string belongs in the location string. + All navigation methods return the instantiated view, so that its fields can be used directly for testing. [NOTE]