org.openqa.selenium.remote.CommandCodec Java Examples
The following examples show how to use
org.openqa.selenium.remote.CommandCodec.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProtocolConverter.java From selenium with Apache License 2.0 | 5 votes |
private CommandCodec<HttpRequest> getCommandCodec(Dialect dialect) { switch (dialect) { case OSS: return new JsonHttpCommandCodec(); case W3C: return new W3CHttpCommandCodec(); default: throw new IllegalStateException("Unknown dialect: " + dialect); } }
Example #2
Source File: JsonHttpCommandHandler.java From selenium with Apache License 2.0 | 5 votes |
private Command decode(HttpRequest request) { UnsupportedCommandException lastException = null; for (CommandCodec<HttpRequest> codec : commandCodecs) { try { return codec.decode(request); } catch (UnsupportedCommandException e) { lastException = e; } } if (lastException != null) { throw lastException; } throw new UnsupportedOperationException("Cannot find command for: " + request.getUri()); }
Example #3
Source File: AppiumCommandExecutor.java From java-client with Apache License 2.0 | 4 votes |
protected CommandCodec<HttpRequest> getCommandCodec() { //noinspection unchecked return getPrivateFieldValue("commandCodec", CommandCodec.class); }
Example #4
Source File: AppiumCommandExecutor.java From java-client with Apache License 2.0 | 4 votes |
protected void setCommandCodec(CommandCodec<HttpRequest> newCodec) { setPrivateFieldValue("commandCodec", newCodec); }
Example #5
Source File: EventFiringAppiumCommandExecutor.java From carina with Apache License 2.0 | 4 votes |
private CommandCodec<HttpRequest> getCommandCodec() { // noinspection unchecked return getPrivateFieldValue("commandCodec", CommandCodec.class); }
Example #6
Source File: EventFiringAppiumCommandExecutor.java From carina with Apache License 2.0 | 4 votes |
private void setCommandCodec(CommandCodec<HttpRequest> newCodec) { setPrivateFieldValue("commandCodec", newCodec); }