iframe = getIframe((Integer) p);
} else if (p instanceof JSONObject) {
String id = ((JSONObject) p).getString("ELEMENT");
iframe = getWebDriver().createElement(id);
} else {
throw new UnsupportedCommandException("not supported : frame selection by " + p.getClass());
}
RemoteWebElement document = iframe.getContentDocument();
RemoteWebElement window = iframe.getContentWindow();
getWebDriver().getContext().setCurrentFrame(iframe, document, window);