Interface ExecuteMethod

All Known Implementing Classes:
RemoteExecuteMethod

public interface ExecuteMethod
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> T
    execute(String commandName)
    Execute the given command without parameters and cast the returned value to T.
    @Nullable Object
    execute(String commandName, @Nullable Map<String,?> parameters)
    Execute the given command on the remote webdriver server.
    default <T> T
    execute(String commandName, @Nullable Map<String,?> parameters, T defaultValue)
    Execute the given command and return the default value if the command return null.
    default <T> T
    executeAs(String commandName, @Nullable Map<String,?> parameters)
    Execute the given command and cast the returned value to T.
  • Method Details

    • execute

      @Nullable Object execute(String commandName, @Nullable Map<String,?> parameters)
      Execute the given command on the remote webdriver server. Any exceptions will be thrown by the underlying execute method.
      Parameters:
      commandName - The remote command to execute
      parameters - The parameters to execute that command with
      Returns:
      The result of Response.getValue().
    • execute

      default <T> T execute(String commandName, @Nullable Map<String,?> parameters, T defaultValue)
      Execute the given command and return the default value if the command return null.
      Returns:
      non-nullable value of type T.
    • executeAs

      default <T> T executeAs(String commandName, @Nullable Map<String,?> parameters)
      Execute the given command and cast the returned value to T.
      Returns:
      non-nullable value of type T.
    • execute

      default <T> T execute(String commandName)
      Execute the given command without parameters and cast the returned value to T.
      Returns:
      non-nullable value of type T.