public static void parseElement(Element element) throws Exception { LoggerUtil.pauseLoggerCheck(); List<Element> childElements = element.elements(); for (Element childElement : childElements) { String childElementName = childElement.getName(); if (childElementName.equals("echo") || childElementName.equals("description")) { runEchoElement(childElement); } else if (childElementName.equals("execute")) { if (childElement.attributeValue("function") != null) { runFunctionExecuteElement(childElement); } else if (childElement.attributeValue("macro") != null) { runMacroExecuteElement(childElement, "macro"); } else if ((childElement.attributeValue("macro-desktop") != null) && !PropsValues.MOBILE_BROWSER) { runMacroExecuteElement(childElement, "macro-desktop"); } else if ((childElement.attributeValue("macro-mobile") != null) && PropsValues.MOBILE_BROWSER) { runMacroExecuteElement(childElement, "macro-mobile"); } else if (childElement.attributeValue("selenium") != null) { runSeleniumElement(childElement); } else if (childElement.attributeValue("test-case") != null) { runTestCaseExecuteElement(childElement); } } else if (childElementName.equals("if")) { runIfElement(childElement); } else if (childElementName.equals("fail")) { runFailElement(childElement); } else if (childElementName.equals("for")) { runForElement(childElement); } else if (childElementName.equals("return")) { runReturnElement(childElement); } else if (childElementName.equals("task")) { runTaskElement(childElement); } else if (childElementName.equals("var")) { runVarElement(childElement, true, true); } else if (childElementName.equals("while")) { runWhileElement(childElement); } } }