public GetElementSizeNHandler(IOSDriver driver, WebDriverLikeRequest request) {
    super(driver, request);

    String js =
        template
            .replace(":sessionId", request.getSession())
            .replace(":opt_checkStale", shouldCheckForStaleness() + "")
            .replace(":reference", request.getVariableValue(":reference"));
    setJS(js);
  }
  public ExecuteScriptNHandler(IOSDriver driver, WebDriverLikeRequest request) {
    super(driver, request);
    try {
      String script = getRequest().getPayload().getString("script");
      JSONArray args = getRequest().getPayload().getJSONArray("args");

      String arguments = buildArguments(args);

      String f = "(function() { " + script + "})";
      String js =
          template
              .replace(":sessionId", request.getSession())
              .replace(":function", f + "(" + arguments + ")");
      setJS(js);
    } catch (JSONException e) {
      e.printStackTrace();
    }
  }