}
public static JSONObject logElementTree(WebDriverLikeCommandExecutor executor, File screenshot, boolean translation) {
Map params = ImmutableMap.of("attachScreenshot", screenshot != null, "translation", translation);
WebDriverLikeRequest request = executor.buildRequest(WebDriverLikeCommand.TREE_ROOT, params);
JSONObject log = executor.execute(request);
if (screenshot != null) {
JSONObject screen = log.optJSONObject("screenshot");
String content = screen.optString("64encoded");
RemoteUIAElement.createFileFrom64EncodedString(screenshot, content);