public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; ObservableList <ApplicationPlatform> TargetApplications = GingerCore.General.ConvertListToObservableList(App.UserProfile.Solution.ApplicationPlatforms.Where(x => x.Platform == ePlatformType.Web).ToList()); xTargetApplicationComboBox.BindControl <ApplicationPlatform>(mWizard.POM, nameof(ApplicationPOMModel.TargetApplicationKey), TargetApplications, nameof(ApplicationPlatform.AppName), nameof(ApplicationPlatform.Key)); xTargetApplicationComboBox.AddValidationRule(new POMTAValidationRule()); if (xTargetApplicationComboBox.Items != null && xTargetApplicationComboBox.Items.Count > 0) { xTargetApplicationComboBox.SelectedIndex = 0; } if (mWizard.POM.TargetApplicationKey != null) { mAppPlatform = App.UserProfile.Solution.GetTargetApplicationPlatform(mWizard.POM.TargetApplicationKey); } mWizard.OptionalAgentsList = GingerCore.General.ConvertListToObservableList((from x in WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Agent>() where x.Platform == mAppPlatform select x).ToList()); xAgentControlUC.Init(mWizard.OptionalAgentsList); App.ObjFieldBinding(xAgentControlUC, ucAgentControl.SelectedAgentProperty, mWizard, nameof(mWizard.Agent)); xAgentControlUC.PropertyChanged += XAgentControlUC_PropertyChanged; AddValidations(); ClearAutoMapElementTypesSection(); SetAutoMapElementTypesGridView(); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; xNameTextBox.BindControl(mWizard.mPomLearnUtils.POM, nameof(ApplicationPOMModel.Name)); xNameTextBox.AddValidationRule(new POMNameValidationRule()); xNameTextBox.Focus(); xURLTextBox.BindControl(mWizard.mPomLearnUtils.POM, nameof(ApplicationPOMModel.PageURL)); xDescriptionTextBox.BindControl(mWizard.mPomLearnUtils.POM, nameof(ApplicationPOMModel.Description)); xTagsViewer.Init(mWizard.mPomLearnUtils.POM.TagsKeys); mBusinessFlowControl = new ucBusinessFlowMap(mWizard.mPomLearnUtils.POM, nameof(mWizard.mPomLearnUtils.POM.MappedBusinessFlow), false); xFrameBusinessFlowControl.Content = mBusinessFlowControl; break; case EventType.Active: SetDefaultPage(); ShowScreenShot(); if (mWizard.ManualElementConfiguration) { xTakeScreenShotLoadButton.Visibility = Visibility.Collapsed; } else { xTakeScreenShotLoadButton.Visibility = Visibility.Visible; } break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; xTargetApplicationComboBox.Style = this.FindResource("$FlatInputComboBoxStyle") as Style; xAgentComboBox.Style = this.FindResource("$FlatInputComboBoxStyle") as Style; ObservableList <ApplicationPlatform> TargetApplications = App.UserProfile.Solution.ApplicationPlatforms; xTargetApplicationComboBox.BindControl <ApplicationPlatform>(mWizard.POM, nameof(ApplicationPOMModel.TargetApplicationKey), TargetApplications, nameof(ApplicationPlatform.AppName), nameof(ApplicationPlatform.Key)); //xAgentComboBox.SelectedValuePath = Agent.Fields.Name; xAgentComboBox.DisplayMemberPath = Agent.Fields.Name; //xNameTextBox.BindControl(mWizard.POM, nameof(ApplicationPOMModel.Name)); if (mWizard.WinExplorer != null) { if (string.IsNullOrEmpty(mWizard.POM.Name)) { //if title empty get something else maybe the url mWizard.POM.Name = mWizard.WinExplorer.GetActiveWindow().Title; } } break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; xNameTextBox.BindControl(mWizard.POM, nameof(ApplicationPOMModel.Name)); xNameTextBox.AddValidationRule(new POMNameValidationRule()); xNameTextBox.Focus(); xURLTextBox.BindControl(mWizard.POM, nameof(ApplicationPOMModel.PageURL)); xDescriptionTextBox.BindControl(mWizard.POM, nameof(ApplicationPOMModel.Description)); xTagsViewer.Init(mWizard.POM.TagsKeys); break; case EventType.Active: ShowScreenShot(); if (mWizard.ManualElementConfiguration) { xTakeScreenShotLoadButton.Visibility = Visibility.Collapsed; } else { xTakeScreenShotLoadButton.Visibility = Visibility.Visible; } break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; ObservableList <ApplicationPlatform> TargetApplications = GingerCore.General.ConvertListToObservableList(WorkSpace.Instance.Solution.ApplicationPlatforms.Where(x => ApplicationPOMModel.PomSupportedPlatforms.Contains(x.Platform)).ToList()); xTargetApplicationComboBox.BindControl <ApplicationPlatform>(mWizard.mPomLearnUtils.POM, nameof(ApplicationPOMModel.TargetApplicationKey), TargetApplications, nameof(ApplicationPlatform.AppName), nameof(ApplicationPlatform.Key)); xTargetApplicationComboBox.AddValidationRule(new POMTAValidationRule()); if (xTargetApplicationComboBox.Items != null && xTargetApplicationComboBox.Items.Count > 0) { xTargetApplicationComboBox.SelectedIndex = 0; } AddValidations(); ClearAutoMapElementTypesSection(); SetAutoMapElementTypesGridView(); xLearnOnlyMappedElements.BindControl(mWizard.mPomLearnUtils, nameof(PomLearnUtils.LearnOnlyMappedElements)); SetElementLocatorsSettingsGridView(); UpdateConfigsBasedOnAgentStatus(); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { if (WizardEventArgs.EventType == EventType.Init) { mWizard = (AddPOMWizard)WizardEventArgs.Wizard; } // TODO: if Finish and not save then do save }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; if (!mWizard.ManualElementConfiguration) { mElementsList.CollectionChanged += ElementsListCollectionChanged; InitilizePomElementsMappingPage(); } break; case EventType.Active: if (mPomAllElementsPage.mAgent == null) { mPomAllElementsPage.SetAgent(mWizard.Agent); } if (mWizard.ManualElementConfiguration) { xReLearnButton.Visibility = Visibility.Hidden; mPomAllElementsPage.mappedUIElementsPage.MainElementsGrid.ValidationRules.Clear(); } else { mPomAllElementsPage.mappedUIElementsPage.MainElementsGrid.ValidationRules.Clear(); mPomAllElementsPage.mappedUIElementsPage.MainElementsGrid.ValidationRules.Add(ucGrid.eUcGridValidationRules.CantBeEmpty); xReLearnButton.Visibility = Visibility.Visible; mSelectedElementTypesList = mWizard.AutoMapElementTypesList.Where(x => x.Selected == true).Select(x => x.ElementType).ToList(); Learn(); } break; case EventType.LeavingForNextPage: case EventType.Finish: mPomAllElementsPage.FinishEditInAllGrids(); if (mPomAllElementsPage != null) { mPomAllElementsPage.StopSpy(); } ResetDriverStopProcess(); break; case EventType.Cancel: if (mPomAllElementsPage != null) { mPomAllElementsPage.StopSpy(); } ResetDriverStopProcess(); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; if (!mWizard.ManualElementConfiguration) { InitilizePomElementsMappingPage(); } break; case EventType.Active: if (mPomAllElementsPage.mAgent == null) { mPomAllElementsPage.SetAgent(mWizard.mPomLearnUtils.Agent); } if (mWizard.ManualElementConfiguration) { xReLearnButton.Visibility = Visibility.Hidden; mPomAllElementsPage.mappedUIElementsPage.MainElementsGrid.ValidationRules.Clear(); } else { mPomAllElementsPage.mappedUIElementsPage.MainElementsGrid.ValidationRules.Clear(); mPomAllElementsPage.mappedUIElementsPage.MainElementsGrid.ValidationRules.Add(ucGrid.eUcGridValidationRules.CantBeEmpty); xReLearnButton.Visibility = Visibility.Visible; Learn(); } break; case EventType.LeavingForNextPage: case EventType.Finish: mPomAllElementsPage.FinishEditInAllGrids(); if (mPomAllElementsPage != null) { mPomAllElementsPage.StopSpy(); } mWizard.mPomLearnUtils.ClearStopLearning(); break; case EventType.Cancel: if (mPomAllElementsPage != null) { mPomAllElementsPage.StopSpy(); } mWizard.mPomLearnUtils.ClearStopLearning(); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; break; case EventType.Active: ShowScreenShot(); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; mWinExplorer = mWizard.WinExplorer; break; case EventType.Active: ShowPOMInfo(); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; Init(); break; case EventType.LeavingForNextPage: mWizard.CheckedFilteringCreteriaList = GingerCore.General.ConvertListToObservableList(FilteringCreteriaList.Where(x => x.Selected).ToList()); mWizard.mAgent = mAgent; mWizard.WinExplorer = mWindowExplorerDriver; break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; Init(); //xTargetApplicationComboBox.Style = this.FindResource("$FlatInputComboBoxStyle") as Style; //xAgentComboBox.Style = this.FindResource("$FlatInputComboBoxStyle") as Style; //xAgentComboBox.SelectedValuePath = Agent.Fields.Name; //xAgentComboBox.DisplayMemberPath = Agent.Fields.Name; //xNameTextBox.BindControl(mWizard.POM, nameof(ApplicationPOMModel.Name)); //if (mWizard.WinExplorer != null) //{ // if (string.IsNullOrEmpty(mWizard.POM.Name)) // { // //if title empty get something else maybe the url // mWizard.POM.Name = mWizard.WinExplorer.GetActiveWindow().Title; // } //} break; case EventType.LeavingForNextPage: string error = string.Empty; if (ValidateFields(ref error)) { mWizard.POM.Name = xNameTextBox.Text; mWizard.POM.Description = xDescriptionTextBox.Text; //mWizard.POM.TargetApplicationKey = App.UserProfile.Solution.ApplicationPlatforms.Where(x => x.Guid == ((ApplicationPlatform)xTargetApplicationComboBox.SelectedItem).Guid).Select(x => x.Key).FirstOrDefault(); ; mWizard.POM.TargetApplicationKey = (RepositoryItemKey)xTargetApplicationComboBox.SelectedValue; } else { //WizardEventArgs.AddError(error); } break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; if (!mWizard.ManualElementConfiguration) { mElementsList.CollectionChanged += ElementsListCollectionChanged; InitilizePomElementsMappingPage(); } break; case EventType.Active: //if (xPomElementsMappingPageFrame.Content == null) // InitilizePomElementsMappingPage(); if (pomAllElementsPage.mAgent == null) { pomAllElementsPage.SetAgent(mWizard.Agent); } if (mWizard.ManualElementConfiguration) { xReLearnButton.Visibility = Visibility.Hidden; pomAllElementsPage.mappedUIElementsPage.MainElementsGrid.ValidationRules.Clear(); } else { pomAllElementsPage.mappedUIElementsPage.MainElementsGrid.ValidationRules.Clear(); pomAllElementsPage.mappedUIElementsPage.MainElementsGrid.ValidationRules.Add(ucGrid.eUcGridValidationRules.CantBeEmpty); xReLearnButton.Visibility = Visibility.Visible; mWizard.IWindowExplorerDriver.UnHighLightElements(); mWizard.ScreenShot = ((IVisualTestingDriver)mWizard.Agent.Driver).GetScreenShot(); mSelectedElementTypesList = mWizard.AutoMapElementTypesList.Where(x => x.Selected == true).Select(x => x.ElementType).ToList(); Learn(); } break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; ObservableList <ApplicationPlatform> TargetApplications = GingerCore.General.ConvertListToObservableList(WorkSpace.UserProfile.Solution.ApplicationPlatforms.Where(x => ApplicationPOMModel.PomSupportedPlatforms.Contains(x.Platform)).ToList()); xTargetApplicationComboBox.BindControl <ApplicationPlatform>(mWizard.mPomLearnUtils.POM, nameof(ApplicationPOMModel.TargetApplicationKey), TargetApplications, nameof(ApplicationPlatform.AppName), nameof(ApplicationPlatform.Key)); xTargetApplicationComboBox.AddValidationRule(new POMTAValidationRule()); if (xTargetApplicationComboBox.Items != null && xTargetApplicationComboBox.Items.Count > 0) { xTargetApplicationComboBox.SelectedIndex = 0; } if (mWizard.mPomLearnUtils.POM.TargetApplicationKey != null) { mAppPlatform = WorkSpace.UserProfile.Solution.GetTargetApplicationPlatform(mWizard.mPomLearnUtils.POM.TargetApplicationKey); } mWizard.OptionalAgentsList = GingerCore.General.ConvertListToObservableList((from x in WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Agent>() where x.Platform == mAppPlatform select x).ToList()); foreach (Agent agent in mWizard.OptionalAgentsList) { agent.Tag = string.Empty; } App.ObjFieldBinding(xAgentControlUC, ucAgentControl.SelectedAgentProperty, mWizard.mPomLearnUtils, nameof(mWizard.mPomLearnUtils.Agent)); xAgentControlUC.Init(mWizard.OptionalAgentsList); xAgentControlUC.PropertyChanged += XAgentControlUC_PropertyChanged; AddValidations(); ClearAutoMapElementTypesSection(); SetAutoMapElementTypesGridView(); xLearnOnlyMappedElements.BindControl(mWizard.mPomLearnUtils, nameof(PomLearnUtils.LearnOnlyMappedElements)); SetElementLocatorsSettingsGridView(); UpdateConfigsBasedOnAgentStatus(); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; //In case if (mWizard.POM.TargetApplicationKey != null) { mAppPlatform = GetTargetApplicationPlatform(); } mWizard.OptionalAgentsList = GingerCore.General.ConvertListToObservableList((from x in WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Agent>() where x.Platform == mAppPlatform select x).ToList()); xAgentControlUC.Init(mWizard.OptionalAgentsList); App.ObjFieldBinding(xAgentControlUC, ucAgentControl.SelectedAgentProperty, mWizard, nameof(mWizard.Agent)); xAgentControlUC.AddValidationRule(new AgentControlValidationRule(AgentControlValidationRule.eAgentControlValidationRuleType.AgentIsMappedAndRunning)); xAgentControlUC.PropertyChanged += XAgentControlUC_PropertyChanged; ClearAutoMapElementTypesSection(); SetAutoMapElementTypesGridView(); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; mElementsList.CollectionChanged += ElementsListCollectionChanged; InitilizePomElementsMappingPage(); break; case EventType.Active: //if (xPomElementsMappingPageFrame.Content == null) // InitilizePomElementsMappingPage(); if (pomAllElementsPage.mWinExplorer == null) { pomAllElementsPage.SetWindowExplorer(mWizard.IWindowExplorerDriver); } mSelectedElementTypesList = mWizard.AutoMapElementTypesList.Where(x => x.Selected == true).Select(x => x.ElementType).ToList(); Learn(); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; xNameTextBox.BindControl(mWizard.POM, nameof(ApplicationPOMModel.Name)); xNameTextBox.AddValidationRule(new POMNameValidationRule()); xNameTextBox.Focus(); xDescriptionTextBox.BindControl(mWizard.POM, nameof(ApplicationPOMModel.Description)); xTagsViewer.Init(mWizard.POM.TagsKeys); ObservableList <ApplicationPlatform> TargetApplications = GingerCore.General.ConvertListToObservableList(App.UserProfile.Solution.ApplicationPlatforms.Where(x => x.Platform == ePlatformType.Web).ToList()); xTargetApplicationComboBox.BindControl <ApplicationPlatform>(mWizard.POM, nameof(ApplicationPOMModel.TargetApplicationKey), TargetApplications, nameof(ApplicationPlatform.AppName), nameof(ApplicationPlatform.Key)); xTargetApplicationComboBox.AddValidationRule(new POMTAValidationRule()); if (xTargetApplicationComboBox.Items != null && xTargetApplicationComboBox.Items.Count > 0) { xTargetApplicationComboBox.SelectedIndex = 0; } break; } }
//private void SetControlsGridView() //{ // ////Set the Tool Bar look // ////Set the Data Grid columns // GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName); // view.GridColsView = new ObservableList<GridColView>(); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.Active), WidthWeight = 2.5, MaxWidth = 50, StyleType = GridColView.eGridColStyleType.CheckBox }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.ElementName), WidthWeight = 100 }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.ElementTitle), WidthWeight = 100 }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.Value), WidthWeight = 100 }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.ElementType), WidthWeight = 60 }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.X), WidthWeight = 60 }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.Y), WidthWeight = 60 }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.Width), WidthWeight = 60 }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.Height), WidthWeight = 60 }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.Path), WidthWeight = 100 }); // view.GridColsView.Add(new GridColView() { Field = nameof(ElementInfo.XPath), WidthWeight = 150 }); // xFoundElementsGrid.SetAllColumnsDefaultView(view); // xFoundElementsGrid.InitViewItems(); //} public void WizardEvent(WizardEventArgs WizardEventArgs) { switch (WizardEventArgs.EventType) { case EventType.Init: mWizard = (AddPOMWizard)WizardEventArgs.Wizard; //mWinExplorer = mWizard.WinExplorer; //xFoundElementsGrid.DataSourceList = mWizard.POM.UIElements; break; case EventType.Active: if (xWindowExlorerFrame.Content == null) { InitilizeWindowExplorer(); } Learn(); break; case EventType.LeavingForNextPage: //mPOM.SelectedUIElements = GingerCore.General.ConvertListToObservableList(mPOM.UIElements.Where(x => x.Selected).ToList()); break; } }
public void WizardEvent(WizardEventArgs WizardEventArgs) { mWizard = (AddPOMWizard)WizardEventArgs.Wizard; }