Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 74cd70b

Browse files
committed
Give user ability to just pull in the command name not the whole body
1 parent e423c32 commit 74cd70b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

SeleniumGridExtras/src/main/java/com/groupon/seleniumgridextras/utilities/JsonWireCommandTranslator.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,19 @@ public JsonWireCommandTranslator(String method, String url, String body) {
2929
}
3030

3131
public String toString() {
32+
return getCommandName() + ": " + getBody();
33+
}
34+
35+
public String getCommandName(){
3236
JsonHttpCommandCodec codec = new JsonHttpCommandCodec();
3337
Command translatedCommand;
3438
try{
35-
translatedCommand = codec.decode(getRequest());
39+
translatedCommand = codec.decode(getRequest());
3640
} catch (UnsupportedCommandException e){
3741
translatedCommand = new Command(new SessionId(""), this.url);
3842
}
39-
return translatedCommand.getName() + ": " + getBody();
43+
44+
return translatedCommand.getName();
4045
}
4146

4247
public HttpRequest getRequest(){

0 commit comments

Comments
 (0)