/// <summary> /// This method gets WEBCloud settings from UI /// </summary> /// <returns>webcloud settings</returns> public WEBCloudConfigModel GetWEBCloudSettingsUI() { WEBCloudConfigModel settings = new WEBCloudConfigModel(); try { WaitElementToBeClickable(WEBcloudsettingsswitchchkbox); settings.WEBCloudStatus = IsCheckboxActive(WEBCloudLocators.WEBCloudSettingsSwitchChkBoxId); settings.WEBCloudSettingsUrlTxtValue = WEBcloudurltxt.Text; var x = WEBcloudporttxt.GetAttribute("value"); settings.WEBCloudPortValue = Convert.ToInt32(WEBcloudporttxt.GetAttribute("value")); //settings.WEBCloudSettingsStatusTxtValue = Logger.Info(string.Format("Retrived WEBCloud setting from info status {0}, URL {1}, port {2}", settings.WEBCloudStatus, settings.WEBCloudSettingsUrlTxtValue, settings.WEBCloudPortValue)); } catch (Exception ex) { Logger.Error(ex, "failed to get WEBCloud setting from UI"); } return(settings); }
/// <summary> /// Set web cloud settings from UI /// </summary> /// <param name="status">WEB cloud status</param> /// <param name="cloudurl">WEB cloud URL</param> /// <param name="cloudport">WEB cloud port</param> /// <returns></returns> public WEBCloudConfigModel SetWEBCloudSettings(bool status = false, string cloudurl = null, string cloudport = null) { WEBCloudConfigModel webcloudSettings = new WEBCloudConfigModel(); try { //Expand WEBCloud Settings commpo.ShowWEBCloudSettings(); //set status webcloudSettings.WEBCloudStatus = webcloudpo.ToggleWEBCloudStatusSwitch(status); //Set DtmfCode webcloudSettings.WEBCloudSettingsUrlTxtValue = webcloudpo.EnterWEBCloudURL(cloudurl); //set Wiegandstatus webcloudSettings.WEBCloudPortValue = webcloudpo.SetWEBCloudPort(cloudport); //click on apply button webcloudSettings.WEBCloudSettingsStatusTxtValue = webcloudpo.ClickApply(); Logger.Info("Set WEBCloud settings successfully"); } catch (Exception ex) { Logger.Error(ex, "Failed to Set WEBCloud settings"); throw; } return(webcloudSettings); }
public WEBCloudSettings_AL() { commpo = new Communication_PO(); webcloudpo = new WEBCloudSettings_PO(); ixmwebutils = new IXMWebUtils(); webcloudsettings = new WEBCloudConfigModel(); }
/// <summary> /// Gets WEBCloud settings from UI /// </summary> /// <returns>WEB cloud settings obj</returns> public WEBCloudConfigModel GetWEBCloudSettingUI() { WEBCloudConfigModel webcloudSettings = new WEBCloudConfigModel(); try { webcloudSettings = webcloudpo.GetWEBCloudSettingsUI(); Logger.Info("WEBCloud settings retrieved from UI"); } catch (Exception ex) { Logger.Error(ex, "failed to retrive status"); } return(webcloudSettings); }
/// <summary> /// Reset web cloud settings from UI /// </summary> /// <returns>Webcloud settings</returns> public WEBCloudConfigModel ResetWEBCloudSettings() { WEBCloudConfigModel webcloudSettings = new WEBCloudConfigModel(); try { //Expand WEBCloud Settings commpo.ShowWEBCloudSettings(); //Click Reset webcloudSettings.WEBCloudSettingsStatusTxtValue = webcloudpo.ClickReset(); Logger.Info("Reset WEBCloud setting" + webcloudSettings.WEBCloudStatus + webcloudSettings.WEBCloudSettingsUrlTxtValue + webcloudSettings.WEBCloudPortValue); } catch (Exception ex) { Logger.Error(ex, "Failed to Reset WEBCloud settings"); throw; } return(webcloudSettings); }