public void ClickFunctionButton(ButtonsEnum.FunctionButton function) { switch (function) { case ButtonsEnum.FunctionButton.SaveToMemory: new Button(SearchCriteria.ByAutomationId($"{FuncButtonNameLocatorPart}5"), $"{ButtonsEnum.FunctionButton.SaveToMemory} Button").Click(); break; case ButtonsEnum.FunctionButton.MemoryClear: new Button(SearchCriteria.ByAutomationId($"{FuncButtonNameLocatorPart}2"), $"{ButtonsEnum.FunctionButton.MemoryClear} Button").Click(); break; case ButtonsEnum.FunctionButton.UseMemory: new Button(SearchCriteria.ByAutomationId($"{FuncButtonNameLocatorPart}3"), $"{ButtonsEnum.FunctionButton.UseMemory} Button").Click(); break; default: throw new ArgumentOutOfRangeException(nameof(function), function, null); } }
public void ClickFunctionButton(ButtonsEnum.FunctionButton function) { _mainWindow.ClickFunctionButton(function); }