/// <summary> /// Method to set DTMF Code. /// </summary> /// <param name="dtmfCode">If null then default will remain</param> /// <returns>default or set DTMF code</returns> public int SetDTMFCode(string dtmfCode = null) { try { if (!string.IsNullOrEmpty(dtmfCode)) { EnterValueTextbox(DTMFDoorOpenTimeCode, dtmfCode); Logger.Info("DTMFCode set to: " + dtmfCode); } else { Logger.Info("DTMF code not to set. Keeping default"); } } catch (Exception ex) { Logger.Error(ex, "Unable to Set DTMFCode"); throw; } return(Convert.ToInt32(DTMFDoorOpenTimeCode.GetAttribute("value"))); }
public DTMFConfigModel GetDTMFSettingsUI() { DTMFConfigModel settings = new DTMFConfigModel(); try { WaitElementToBeClickable(DTMFsettingsswitch); var x = DTMFDoorOpenTimeCode.GetAttribute("value"); settings.DTMFCode = Convert.ToInt32(DTMFDoorOpenTimeCode.GetAttribute("value")); settings.DTMFStatus = IsCheckboxActive(DTMFLocators.DTMFSettingsSwitchChkBoxId); settings.SendWiegandStatus = IsCheckboxActive(DTMFLocators.DTMFSendWiegandChkBoxId); //settings.DTMFSettingsStatusTxtValue = Logger.Info(string.Format("Retrived DTMF setting from info code {0}, status {1}, wiegand {2}", settings.DTMFCode, settings.DTMFStatus, settings.SendWiegandStatus)); } catch (Exception ex) { Logger.Error(ex, "failed to get DTMF setting from UI"); } return(settings); }