File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
java/client/src/org/openqa/selenium/remote Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -1101,7 +1101,21 @@ public String toString() {
1101
1101
if (caps == null ) {
1102
1102
return super .toString ();
1103
1103
}
1104
- return String .format ("%s: %s on %s (%s)" , getClass ().getSimpleName (),
1105
- caps .getBrowserName (), caps .getPlatform (), getSessionId ());
1104
+
1105
+ // w3c name first
1106
+ Object platform = caps .getCapability ("platformName" );
1107
+ if (!(platform instanceof String )) {
1108
+ platform = caps .getCapability ("platform" );
1109
+ }
1110
+ if (platform == null ) {
1111
+ platform = "unknown" ;
1112
+ }
1113
+
1114
+ return String .format (
1115
+ "%s: %s on %s (%s)" ,
1116
+ getClass ().getSimpleName (),
1117
+ caps .getBrowserName (),
1118
+ platform ,
1119
+ getSessionId ());
1106
1120
}
1107
1121
}
You can’t perform that action at this time.
0 commit comments