/// <summary> /// AssertMethod1 - Use 'AssertMethod1ExpectedValues' to pass parameters into this method. /// </summary> public AdCenter.UITestFramework.Object.Campaign GetCampaignFromEditPanel() { #region Variable Declarations WinEdit uITxtNameEdit = this.UIMicrosoftadlabsUSDadWindow1.UITxtNameWindow.UITxtNameEdit; WinComboBox uICbBudgetTypeComboBox = this.UIMicrosoftadlabsUSDadWindow2.UICbBudgetTypeWindow.UICbBudgetTypeComboBox; WinComboBox uICbStatusComboBox = this.UIMicrosoftadlabsUSDadWindow3.UICbStatusWindow.UICbStatusComboBox; WinEdit uITxtDailyBudgetEdit = this.UIMicrosoftadlabsUSDadWindow4.UITxtDailyBudgetWindow.UITxtDailyBudgetEdit; WinEdit uITxtMonthlyBudgetEdit = this.UIMicrosoftadlabsUSDadWindow5.UITxtMonthlyBudgetWindow.UITxtMonthlyBudgetEdit; #endregion AdCenter.UITestFramework.Object.Campaign campaignObject = new UITestFramework.Object.Campaign { Name = uITxtNameEdit.Text, Status = uICbStatusComboBox.SelectedItem, BudgetType = uICbBudgetTypeComboBox.SelectedItem, DailyBudget = uITxtDailyBudgetEdit.Text, MonthlyBudget = uITxtMonthlyBudgetEdit.Text, }; return campaignObject; }
public Google.UITestFramework.Object.Campaign GetCampaignFromEditPanel() { WinEdit uITBDailyBudgetEdit = this.UIWss_adsagetest163comWindow1.UITBDailyBudgetWindow.UITBDailyBudgetEdit; WinComboBox uICBStatusComboBox = this.UIWss_adsagetest163comWindow1.UICBStatusWindow.UICBStatusComboBox; UITestControl startDate = this.UIWss_adsagetest163comWindow1.UIDTPStartDateWindow.UIDTPStartDateClient.GetChildren()[0]; UITestControl endDate = this.UIWss_adsagetest163comWindow1.UIDTPEndDateWindow.UIDTPEndDateClient.GetChildren()[0]; WinComboBox uICBSearchNetworkComboBox = this.UIWss_adsagetest163comWindow1.UICBSearchNetworkWindow.UICBSearchNetworkComboBox; WinComboBox uICBContentNetworkComboBox = this.UIWss_adsagetest163comWindow1.UICBContentNetworkWindow.UICBContentNetworkComboBox; WinEdit uITBNameEdit = this.UIWss_adsagetest163comWindow1.UITBNameWindow.UITBNameEdit; Google.UITestFramework.Object.Campaign campaign = new UITestFramework.Object.Campaign { Name = uITBNameEdit.Text, DailyBudget = uITBDailyBudgetEdit.Text, Status = uICBStatusComboBox.SelectedItem, StartDate = DateTime.Parse(startDate.GetProperty(WinWindow.PropertyNames.AccessibleName).ToString()).ToString("MM/dd/yyyy"), EndDate = DateTime.Parse(endDate.GetProperty(WinWindow.PropertyNames.AccessibleName).ToString()).ToString("MM/dd/yyyy"), SearchNetwork = uICBSearchNetworkComboBox.SelectedItem, DisplayNetwork = uICBContentNetworkComboBox.SelectedItem, }; return campaign; }