Skip to content

Commit

Permalink
print requested capabilities in SessionNotCreatedException (#11604)
Browse files Browse the repository at this point in the history
without this change, `SessionNotCreatedException` always prints out empty capabilities:

```
org.openqa.selenium.SessionNotCreatedException: Could not start a new session...
Host info: ...
Build info: version: '4.8.0'...
System info: ...
Driver info: ...
Command: [null, newSession...}]
Capabilities {}

	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:561)
```
  • Loading branch information
asolntsev authored Feb 2, 2023
1 parent ce0b6f1 commit 23782b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/src/org/openqa/selenium/remote/RemoteWebDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public RemoteWebDriver(URL remoteAddress, Capabilities capabilities, boolean ena

public RemoteWebDriver(CommandExecutor executor, Capabilities capabilities) {
this.executor = Require.nonNull("Command executor", executor);
capabilities = init(capabilities);
this.capabilities = init(capabilities);

if (executor instanceof NeedsLocalLogs) {
((NeedsLocalLogs) executor).setLocalLogs(localLogs);
Expand Down

0 comments on commit 23782b3

Please sign in to comment.