code: public Object executeScript(String script, JSONArray args) {
  
      try {
        JSONArray arguments = processScriptArguments(args);
        JSONObject response = getScriptResponse(script, arguments);
        Object o = cast(response);
        return o;
      } catch (JSONException e) {
        throw new WebDriverException(e);
      }
  
    }
docs: TODO freynaud fix the element swapping.