public Analyzer(string xpath) { XPath = xpath; ObjectUnderAnalyzsis = null; try { ErrorDetails = string.Empty; State = StateMachineFactory.ConvertXpathToStates(xpath); if (State == null) { Logger.Logger.GetLogger().WriteLog($"Unable to find the '" + xpath + "' object."); } else { ObjectUnderAnalyzsis = State.GetGuiObject(); } if (ObjectUnderAnalyzsis == null) { ErrorDetails = "Unable to find the '" + xpath + "' object."; } } catch (Exception ex) { ErrorDetails = ex.Message; Logger.Logger.GetLogger().WriteLog($"{ex.StackTrace}"); Logger.Logger.GetLogger().WriteLog($"Unable to find the '" + xpath + "' object."); } }