All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.selendroid.server.handler.timeouts.AsyncTimeoutHandler Maven / Gradle / Ivy

package io.selendroid.server.handler.timeouts;

import org.json.JSONException;

import io.selendroid.server.common.Response;
import io.selendroid.server.common.SelendroidResponse;
import io.selendroid.server.common.http.HttpRequest;
import io.selendroid.server.handler.SafeRequestHandler;

public class AsyncTimeoutHandler extends SafeRequestHandler {
  public AsyncTimeoutHandler(String mappedUri) {
    super(mappedUri);
  }
  @Override
  public Response safeHandle(HttpRequest request) throws JSONException {
    getSelendroidDriver(request).setAsyncTimeout(getPayload(request).getLong("ms"));
    return new SelendroidResponse(getSessionId(request), null);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy