Skip to content

Commit c01587a

Browse files
committed
[java] Printing response payload to understand error
Fixes #11927
1 parent 737c1cc commit c01587a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

java/src/org/openqa/selenium/edge/EdgeOptions.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,11 @@ public EdgeOptions() {
5656
}
5757

5858
/**
59-
* Changes the browser name to 'webview2' to enable
60-
* <a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/webdriver">
61-
* test automation of WebView2 apps with Microsoft Edge WebDriver
62-
* </a>
59+
* Changes the browser name to 'webview2' to enable <a
60+
* href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/webdriver">test
61+
* automation of WebView2 apps with Microsoft Edge WebDriver </a>
6362
*
64-
* @param enable boolean flag to enable or disable the 'webview2' usage
63+
* @param enable boolean flag to enable or disable the 'webview2' usage
6564
*/
6665
public void useWebView(boolean enable) {
6766
String browserName = enable ? WEBVIEW2_BROWSER_NAME : EDGE.browserName();

java/src/org/openqa/selenium/remote/ProtocolHandshake.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ private Either<SessionNotCreatedException, Result> createSession(
151151
() ->
152152
Either.left(
153153
new SessionNotCreatedException(
154-
"Handshake response does not match any supported protocol")));
154+
String.format(
155+
"Handshake response does not match any supported protocol. "
156+
+ "Response payload: %s",
157+
string(response)))));
155158
}
156159

157160
public static class Result {

0 commit comments

Comments
 (0)