示例#1
0
        public ActBrowserElementEditPage(ActBrowserElement act)
        {
            InitializeComponent();
            mAct = act;

            if (act.Platform == ePlatformType.NA)
            {
                act.Platform = GetActivityPlatform();
            }
            mPlatform = PlatformInfoBase.GetPlatformImpl(act.Platform);

            List <ActBrowserElement.eControlAction> supportedControlActions = mPlatform.GetPlatformBrowserControlOperations();

            //bind controls
            App.FillComboFromEnumVal(xControlActionComboBox, mAct.ControlAction, supportedControlActions.Cast <object>().ToList());
            App.ObjFieldBinding(xControlActionComboBox, ComboBox.SelectedValueProperty, mAct, ActBrowserElement.Fields.ControlAction);

            ValueUC.Init(mAct.GetOrCreateInputParam("Value"));
            xLocateValueVE.BindControl(mAct, Act.Fields.LocateValue);
            xGotoURLTypeRadioButton.Init(typeof(ActBrowserElement.eGotoURLType), xGotoURLTypeRadioButtonPnl, mAct.GetOrCreateInputParam(ActBrowserElement.Fields.GotoURLType, ActBrowserElement.eGotoURLType.Current.ToString()));
            xElementLocateByComboBox.BindControl(mAct, Act.Fields.LocateBy);
            xImplicitWaitVE.BindControl(mAct, ActBrowserElement.Fields.ImplicitWait);

            SetVisibleControlsForAction();
        }
示例#2
0
        public ApplitoolsComparePage(GingerCore.Actions.ActVisualTesting mAct)
        {
            InitializeComponent();
            // TODO: Complete member initialization
            this.mAct = mAct;
            xApplitoolsActionComboBox.Init(mAct.GetOrCreateInputParam(ApplitoolsAnalyzer.ApplitoolsAction, ApplitoolsAnalyzer.eApplitoolsAction.Checkpoint.ToString()), typeof(ApplitoolsAnalyzer.eApplitoolsAction), false);
            xApplitoolsActionComboBox.ComboBox.SelectionChanged += ChangeApplitoolsAction_Changed;

            xActionByComboBox.Init(mAct.GetOrCreateInputParam(ApplitoolsAnalyzer.ActionBy, ApplitoolsAnalyzer.eActionBy.Window.ToString()), typeof(ApplitoolsAnalyzer.eActionBy), false);
            xActionByComboBox.ComboBox.SelectionChanged += ChangeActionBy_Changed;
            InitLayout();

            ApplicationNameUCVE.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActVisualTesting.Fields.ApplitoolsParamApplicationName, (Context.GetAsContext(mAct.Context)).BusinessFlow.MainApplication), true, false);

            TestNameUCVE.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActVisualTesting.Fields.ApplitoolsParamTestName, (Context.GetAsContext(mAct.Context)).BusinessFlow.CurrentActivity.ActivityName), true, false);


            SetMatchLevelComboBox.Init(mAct.GetOrCreateInputParam(ApplitoolsAnalyzer.ApplitoolsMatchLevel, ApplitoolsAnalyzer.eMatchLevel.Strict.ToString()), typeof(ApplitoolsAnalyzer.eMatchLevel), false, null);
            GingerCore.GeneralLib.BindingHandler.ActInputValueBinding(DoNotFailActionOnMismatch, CheckBox.IsCheckedProperty, mAct.GetOrCreateInputParam(ApplitoolsAnalyzer.FailActionOnMistmach, "False"));
            //List<eLocateBy> locatorsTypeList = mAct.AvailableLocateBy().Where(e => e != eLocateBy.iOSClassChain && e != eLocateBy.iOSPredicateString).ToList();
            if (mAct.Platform == ePlatformType.NA)
            {
                mAct.Platform = GetActionPlatform();
            }
            PlatformInfoBase mPlatform    = PlatformInfoBase.GetPlatformImpl(mAct.Platform);
            List <eLocateBy> LocateByList = mPlatform.GetPlatformUIElementLocatorsList();

            xElementLocateByComboBox.BindControl(mAct, Act.Fields.LocateBy, LocateByList);
            xLocateValueVE.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(Act.Fields.LocateValue));
            mAct.PropertyChanged += mAct_PropertyChanged;
            SetLocateValueControls();
        }
        public ActBrowserElementEditPage(ActBrowserElement act)
        {
            InitializeComponent();
            mAct = act;

            if (act.Platform == ePlatformType.NA)
            {
                act.Platform = GetActionPlatform();
            }
            mPlatform = PlatformInfoBase.GetPlatformImpl(act.Platform);

            List <ActBrowserElement.eControlAction> supportedControlActions = mPlatform.GetPlatformBrowserControlOperations();

            //validate operation is valid
            if (supportedControlActions.Contains(mAct.ControlAction) == false)
            {
                mAct.ControlAction = supportedControlActions[0];
            }

            //bind controls
            GingerCore.General.FillComboFromEnumObj(xControlActionComboBox, mAct.ControlAction, supportedControlActions.Cast <object>().ToList());
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(xControlActionComboBox, ComboBox.SelectedValueProperty, mAct, ActBrowserElement.Fields.ControlAction);

            ValueUC.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam("Value"));
            xLocateValueVE.BindControl(Context.GetAsContext(mAct.Context), mAct, Act.Fields.LocateValue);
            xGotoURLTypeRadioButton.Init(typeof(ActBrowserElement.eGotoURLType), xGotoURLTypeRadioButtonPnl, mAct.GetOrCreateInputParam(ActBrowserElement.Fields.GotoURLType, ActBrowserElement.eGotoURLType.Current.ToString()));
            xURLSrcRadioButton.Init(typeof(ActBrowserElement.eURLSrc), xURLSrcRadioButtonPnl, mAct.GetOrCreateInputParam(ActBrowserElement.Fields.URLSrc, ActBrowserElement.eURLSrc.Static.ToString()), URLSrcRadioButton_Clicked);
            xElementLocateByComboBox.BindControl(mAct, Act.Fields.LocateBy);
            xImplicitWaitVE.BindControl(Context.GetAsContext(mAct.Context), mAct, ActBrowserElement.Fields.ImplicitWait);

            SetVisibleControlsForAction();
        }
示例#4
0
        public UIElementTableConfigPage(ElementInfo ElementInfo, ObservableList <Act> Actions, Context context)
        {
            eBaseWindow      = BaseWindow.WindowExplorer;
            mAct             = new ActUIElement();
            mAct.Context     = context;
            mAct.Description = "UI Element Table";
            string targetApp = context?.BusinessFlow.CurrentActivity.TargetApplication;

            mPlatform = PlatformInfoBase.GetPlatformImpl((from x in  WorkSpace.Instance.Solution.ApplicationPlatforms where x.AppName == targetApp select x.Platform).FirstOrDefault());

            if (ElementInfo.ElementType.Contains("JEditor"))
            {
                mAct.ElementType   = eElementType.EditorPane;
                mAct.ElementAction = ActUIElement.eElementAction.JEditorPaneElementAction;
                mAct.AddOrUpdateInputParamValue(ActUIElement.Fields.SubElementType, ActUIElement.eSubElementType.HTMLTable.ToString());
                mAct.AddOrUpdateInputParamValue(ActUIElement.Fields.SubElementAction, ActUIElement.eElementAction.TableCellAction.ToString());
            }
            else
            {
                mAct.ElementType   = eElementType.Table;
                mAct.ElementAction = ActUIElement.eElementAction.TableCellAction;
            }

            mElementInfo = ElementInfo;
            mActions     = Actions;
            ShowCellActions();
            InitializeComponent();
            InitTableInfo();

            ShowTableControlActionConfigPage(mPlatform);
            SetComponents();
            SetDescriptionDetails();
        }
        public void SetDriver(IWindowExplorer windowExplorerDriver)
        {
            this.Dispatcher.Invoke(() =>
            {
                if (mWindowExplorerDriver != windowExplorerDriver)
                {
                    mWindowExplorerDriver = windowExplorerDriver;
                    xWindowSelectionUC.mWindowExplorerDriver = mWindowExplorerDriver;
                    xWindowSelectionUC.Platform            = PlatformInfoBase.GetPlatformImpl(mContext.Platform);
                    xUCElementDetails.WindowExplorerDriver = windowExplorerDriver;

                    InitUCElementDetailsLocatorsGrid();
                }

                if (windowExplorerDriver == null)
                {
                    xWindowSelectionUC.WindowsComboBox.ItemsSource = null;
                    xUCElementDetails.SelectedElement = null;
                }

                if (windowExplorerDriver != null && xWindowSelectionUC.WindowsComboBox.ItemsSource == null)
                {
                    xWindowSelectionUC.UpdateWindowsList();
                    xUCElementDetails.SelectedElement = null;
                }
            });
        }
        private void SetDriver()
        {
            this.Dispatcher.Invoke(() =>
            {
                if (mContext.Agent != null && (mContext.Agent.IsSupportRecording() || mContext.Agent.Driver is IRecord))
                {
                    mDriver = mContext.Agent.Driver as IWindowExplorer;

                    xWindowSelectionUC.mWindowExplorerDriver = mDriver;
                    xWindowSelectionUC.mPlatform             = PlatformInfoBase.GetPlatformImpl(mContext.Platform);
                    if (mDriver == null)
                    {
                        xWindowSelectionUC.WindowsComboBox.ItemsSource = null;
                    }

                    if (mDriver != null && xWindowSelectionUC.WindowsComboBox.ItemsSource == null)
                    {
                        xWindowSelectionUC.UpdateWindowsList();
                    }

                    if (PlatformInfoBase.GetPlatformImpl(mContext.Platform) != null &&
                        PlatformInfoBase.GetPlatformImpl(mContext.Platform).IsPlatformSupportPOM())
                    {
                        xPOMPanel.Visibility = Visibility.Visible;
                    }
                    else
                    {
                        xPOMPanel.Visibility = Visibility.Collapsed;
                    }
                }
            });
        }
示例#7
0
        private List <ComboEnumItem> GetPlatformLocatByList()
        {
            List <ComboEnumItem> locateByComboItemList = new List <ComboEnumItem>();

            var targetPlatform = WorkSpace.Instance.Solution.GetTargetApplicationPlatform(mPOM.TargetApplicationKey);

            if (!targetPlatform.Equals(ePlatformType.NA))
            {
                PlatformInfoBase platformInfoBase     = PlatformInfoBase.GetPlatformImpl(targetPlatform);
                List <eLocateBy> platformLocateByList = platformInfoBase.GetPlatformUIElementLocatorsList();

                foreach (var locateBy in platformLocateByList)
                {
                    if (!locateBy.Equals(eLocateBy.POMElement))
                    {
                        ComboEnumItem comboEnumItem = new ComboEnumItem();
                        comboEnumItem.text  = GingerCore.General.GetEnumValueDescription(typeof(eLocateBy), locateBy);
                        comboEnumItem.Value = locateBy;
                        locateByComboItemList.Add(comboEnumItem);
                    }
                }
            }

            return(locateByComboItemList);
        }
        public UIElementTableConfigPage(ActUIElement Act, PlatformInfoBase Platform)
        {
            eBaseWindow = BaseWindow.ActEditPage;
            mAct        = Act;
            mPlatform   = Platform;

            InitializeComponent();
            if (Act.ElementData != null)
            {
                if (Act.ElementType == eElementType.EditorPane || Act.ElementType.ToString() == "JEditor")
                {
                    mAct.ElementType   = eElementType.EditorPane;
                    mAct.ElementAction = ActUIElement.eElementAction.JEditorPaneElementAction;
                    mAct.AddOrUpdateInputParamValue(ActUIElement.Fields.SubElementType, ActUIElement.eSubElementType.HTMLTable.ToString());
                    mAct.AddOrUpdateInputParamValue(ActUIElement.Fields.SubElementAction, ActUIElement.eElementAction.TableCellAction.ToString());
                    mAct.AddOrUpdateInputParamValue(ActUIElement.Fields.ControlAction, ActUIElement.eElementAction.GetValue.ToString());
                }
                else
                {
                    mAct.ElementType   = eElementType.Table;
                    mAct.ElementAction = ActUIElement.eElementAction.TableCellAction;
                    mAct.AddOrUpdateInputParamValue(ActUIElement.Fields.ControlAction, ActUIElement.eElementAction.GetValue.ToString());
                }

                InitTableInfo();
                SetComponents(true);
                SetDescriptionDetails();
            }

            ShowTableControlActionConfigPage(mPlatform);
        }
        public ActUIElementEditPage(ActUIElement act)
        {
            InitializeComponent();
            mAction = act;
            if (act.Platform == ePlatformType.NA)
            {
                act.Platform = GetActionPlatform();
            }
            mPlatform = PlatformInfoBase.GetPlatformImpl(act.Platform);
            List <eLocateBy> LocateByList = mPlatform.GetPlatformUIElementLocatorsList();

            ElementLocateByComboBox.BindControl(mAction, nameof(ActUIElement.ElementLocateBy), LocateByList, false);

            //if widgets element, only supported to java platform now.
            if (act.Platform.Equals(ePlatformType.Java))
            {
                ShowWidgetsElementCheckBox();
            }

            BindElementTypeComboBox();

            SetLocateValueFrame();
            ShowPlatformSpecificPage();
            ShowControlSpecificPage();
            ElementLocateByComboBox.SelectionChanged += ElementLocateByComboBox_SelectionChanged;
        }
示例#10
0
        public Page GetPlatformEditPage()
        {
            PlatformInfoBase mPlatform = null;

            if (mPlatform != null)
            {
                string pageName = mPlatform.GetPlatformGenericElementEditControls();
                if (!String.IsNullOrEmpty(pageName))
                {
                    string classname = "Ginger.Actions." + pageName;
                    Type   t         = Assembly.GetExecutingAssembly().GetType(classname);
                    if (t == null)
                    {
                        throw new Exception("Action edit page not found - " + classname);
                    }
                    Page platformPage = (Page)Activator.CreateInstance(t, mAct);

                    if (platformPage != null)
                    {
                        return(platformPage);
                    }
                }
            }
            return(null);
        }
示例#11
0
 public LocateByMultiplePropertiesEditPage(ActUIElement Action, PlatformInfoBase Platform)
 {
     InitializeComponent();
     mAction   = Action;
     mPlatform = Platform;
     SetMultiplePropertiesGridView();
 }
示例#12
0
        /// <summary>
        /// Just provide the ElementInfo Object and would generate supported Action for the same according to the current selected Platform
        /// </summary>
        /// <param name="elementInfo"></param>
        /// <param name="mContext"></param>
        /// <returns></returns>
        static Act GeneratePOMElementRelatedAction(ElementInfo elementInfo, Context mContext)
        {
            Act           instance;
            IPlatformInfo mPlatform  = PlatformInfoBase.GetPlatformImpl(mContext.Platform);
            string        elementVal = string.Empty;

            if (elementInfo.OptionalValuesObjectsList.Count > 0)
            {
                elementVal = Convert.ToString(elementInfo.OptionalValuesObjectsList.Where(v => v.IsDefault).FirstOrDefault().Value);
            }

            ElementActionCongifuration actionConfigurations = new ElementActionCongifuration
            {
                LocateBy           = eLocateBy.POMElement,
                LocateValue        = elementInfo.ParentGuid.ToString() + "_" + elementInfo.Guid.ToString(),
                ElementValue       = elementVal,
                AddPOMToAction     = true,
                POMGuid            = elementInfo.ParentGuid.ToString(),
                ElementGuid        = elementInfo.Guid.ToString(),
                LearnedElementInfo = elementInfo,
            };

            instance = mPlatform.GetPlatformAction(elementInfo, actionConfigurations);
            return(instance);
        }
 private void SetElementLocatorsSettingsData()
 {
     if (mWizard.mPomDeltaUtils.PomLearnUtils.ElementLocatorsSettingsList.Count == 0)
     {
         mWizard.mPomDeltaUtils.PomLearnUtils.ElementLocatorsSettingsList = PlatformInfoBase.GetPlatformImpl(mAppPlatform).GetLearningLocators();
     }
     xElementLocatorsSettingsGrid.DataSourceList = mWizard.mPomDeltaUtils.PomLearnUtils.ElementLocatorsSettingsList;
 }
        public void ShowTableControlActionConfigPage(PlatformInfoBase mPlatform)
        {
            if (mAct.ElementAction == ActUIElement.eElementAction.JEditorPaneElementAction)
            {
                SubElementTypeComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.SubElementType),
                                            mPlatform.GetSubElementType(mAct.ElementType).ToList(), isVENeeded: false);

                operationTypeList = new List <GingerCore.General.ComboItem>();
                ActUIElement.eSubElementType elementType;
                if (Enum.TryParse(mAct.GetInputParamCalculatedValue(ActUIElement.Fields.SubElementType), out elementType))
                {
                }

                SubElementActionComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.SubElementAction),
                                              mPlatform.GetSubElementAction(elementType).ToList(), isVENeeded: false,
                                              UCselectionChange: SubElementActionComboBox_SelectionChanged);
                SubElementDetailsPanel.Visibility = Visibility.Visible;
                ActUIElement.eElementAction selectedSubElementAction;

                if (Enum.TryParse(mAct.GetInputParamCalculatedValue(ActUIElement.Fields.SubElementAction), out selectedSubElementAction))
                {
                    operationTypeList = mPlatform.GetTableControlActions(selectedSubElementAction).Select(x => new GingerCore.General.ComboItem()
                    {
                        Value = x.ToString(), text = x.ToString()
                    }).ToList();
                }
            }
            else
            {
                operationTypeList = mPlatform.GetTableControlActions(mAct.ElementAction).Select(x => new GingerCore.General.ComboItem()
                {
                    Value = x.ToString(), text = x.ToString()
                }).ToList();
            }
            ControlActionComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ControlAction), operationTypeList, isVENeeded: true, UCselectionChange: ControlActionComboBox_SelectionChanged);

            if (mAct.ElementAction == ActUIElement.eElementAction.TableRowAction || mAct.GetInputParamValue(ActUIElement.Fields.SubElementAction) == ActUIElement.eElementAction.TableRowAction.ToString())
            {
                RowLabelPanel.Visibility         = Visibility.Visible;
                RowSelectorPanel.Visibility      = Visibility.Visible;
                RowSelectorValuePanel.Visibility = Visibility.Visible;
                WhereColumnValue.Visibility      = Visibility.Visible;
                TableActionFieldBinding();
            }
            if (mAct.ElementAction == ActUIElement.eElementAction.TableCellAction || mAct.GetInputParamValue(ActUIElement.Fields.SubElementAction) == ActUIElement.eElementAction.TableCellAction.ToString())
            {
                RowLabelPanel.Visibility            = Visibility.Visible;
                RowSelectorPanel.Visibility         = Visibility.Visible;
                RowSelectorValuePanel.Visibility    = Visibility.Visible;
                WhereColumnValue.Visibility         = Visibility.Visible;
                ColumnLabelPanel.Visibility         = Visibility.Visible;
                cmbColSelectorValuePanel.Visibility = Visibility.Visible;
                cmbColumnValuePanel.Visibility      = Visibility.Visible;
                cmbColSelectorValue.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ColSelectorValue), typeof(ActUIElement.eTableElementRunColSelectorValue), isVENeeded: false, UCselectionChange: ColSelectorValue_SelectionChanged);
                cmbColumnValue.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.LocateColTitle), isVENeeded: true, UCselectionChange: ColumnValue_SelectionChanged);
                TableActionFieldBinding();
            }
        }
 private void SetAutoMapElementTypes()
 {
     if (mWizard.mPomLearnUtils.AutoMapBasicElementTypesList.Count == 0 || mWizard.mPomLearnUtils.AutoMapAdvanceElementTypesList.Count == 0)
     {
         var elementList = PlatformInfoBase.GetPlatformImpl(mAppPlatform).GetUIElementFilterList();
         mWizard.mPomLearnUtils.AutoMapBasicElementTypesList = elementList["Basic"];
         mWizard.mPomLearnUtils.AutoMapAdvanceElementTypesList = elementList["Advanced"];
     }
 }
示例#16
0
        public UIElementTableConfigPage(ActUIElement Act, PlatformInfoBase Platform)
        {
            eBaseWindow = BaseWindow.ActEditPage;
            mAct        = Act;
            mPlatform   = Platform;

            InitializeComponent();
            ShowTableControlActionConfigPage(mPlatform);
        }
示例#17
0
 public UIElementDragAndDropEditPage(ActUIElement Action, PlatformInfoBase mPlatform)
 {
     mAction = Action;
     InitializeComponent();
     DragDropType.Init(mAction.GetOrCreateInputParam(ActUIElement.Fields.DragDropType), mPlatform.GetPlatformDragDropTypeList(), false, new SelectionChangedEventHandler(DragDropType_SelectionChanged));
     TargetElement.BindControl(mAction, ActUIElement.Fields.TargetLocateBy, mPlatform.GetPlatformUIElementsType());
     TargetLocateByComboBox.BindControl(mAction, ActUIElement.Fields.TargetLocateBy, mPlatform.GetPlatformUIElementLocatorsList());
     TargetLocatorValue.Init(mAction.GetOrCreateInputParam(ActUIElement.Fields.TargetLocateValue), true, false, UCValueExpression.eBrowserType.Folder);
     SourceDragXY.Init(mAction.GetOrCreateInputParam(ActUIElement.Fields.SourceDragXY), true, false);
     TargetDropXY.Init(mAction.GetOrCreateInputParam(ActUIElement.Fields.TargetDropXY), true, false);
 }
示例#18
0
        public ActUIElementEditPage(ActUIElement act)
        {
            InitializeComponent();
            mAction = act;
            ePlatformType ActivityPlatform = GetActionPlatform();

            mPlatform = PlatformInfoBase.GetPlatformImpl(ActivityPlatform);
            ElementTypeComboBox.BindControl(mAction, ActUIElement.Fields.ElementType, mPlatform.GetPlatformUIElementsType());
            ElementLocateByComboBox.BindControl(mAction, ActUIElement.Fields.ElementLocateBy, mPlatform.GetPlatformUIElementLocatorsList());
            ShowPlatformSpecificPage();
            ShowControlSpecificPage();
        }
示例#19
0
        public UIElementClickAndValidateEditPage(ActUIElement Act, PlatformInfoBase mPlatform)
        {
            mAct = Act;
            InitializeComponent();

            //TODO: Binding of all UI elements
            ClickType.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ClickType), mPlatform.GetPlatformUIClickTypeList(), false, null);
            ValidationType.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ValidationType), mPlatform.GetPlatformUIValidationTypesList(), false, null);
            ValidationElement.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ValidationElement), mPlatform.GetPlatformUIElementsType(), false, null);
            LocateByComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ValidationElementLocateBy), mPlatform.GetPlatformUIElementLocatorsList(), false, null);
            LocatorValue.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ValidationElementLocatorValue), true, false, UCValueExpression.eBrowserType.Folder);
            GingerCore.General.ActInputValueBinding(LoopThroughClicks, CheckBox.IsCheckedProperty, mAct.GetOrCreateInputParam(ActUIElement.Fields.LoopThroughClicks, "False"));
        }
示例#20
0
        public UIElementClickAndValidateEditPage(ActUIElement Act, PlatformInfoBase mPlatform)
        {
            mAct = Act;
            InitializeComponent();

            //TODO: Binding of all UI elements
            ClickType.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ClickType), mPlatform.GetPlatformUIClickTypeList(), false, null);
            xValidationType.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ValidationType), mPlatform.GetPlatformUIValidationTypesList(), false, null);
            xValidationElementTypeComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ValidationElement), mPlatform.GetPlatformUIElementsType(), false, null);
            xValidationElementLocateByComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ValidationElementLocateBy), mPlatform.GetPlatformUIElementLocatorsList(), false, null);
            SetLocateValueFrame();
            GingerCore.GeneralLib.BindingHandler.ActInputValueBinding(LoopThroughClicks, CheckBox.IsCheckedProperty, mAct.GetOrCreateInputParam(ActUIElement.Fields.LoopThroughClicks, "False"));

            xValidationElementLocateByComboBox.ComboBox.SelectionChanged += ElementLocateByComboBox_SelectionChanged;
        }
        private void SetDefaultPage()
        {
            xPageUrlRadioBtn.IsChecked = true;

            mBusinessFlowControl.TargetApplication = mWizard.mPomLearnUtils.POM.TargetApplicationKey.ItemName;

            ePlatformType mAppPlatform = amdocs.ginger.GingerCoreNET.WorkSpace.Instance.Solution.GetTargetApplicationPlatform(mWizard.mPomLearnUtils.POM.TargetApplicationKey);

            PlatformInfoBase platformInfoBase = PlatformInfoBase.GetPlatformImpl(mAppPlatform);

            if (platformInfoBase != null)
            {
                xPageUrlRadioBtn.Content = platformInfoBase.GetPageUrlRadioLabelText();
            }
        }
示例#22
0
        private void StartRecording()
        {
            IRecord       record       = (IRecord)mDriver;
            IPlatformInfo platformInfo = PlatformInfoBase.GetPlatformImpl(mContext.Platform);

            if (xIntegratePOM.IsChecked == true)
            {
                mRecordingMngr = new RecordingManager(mPomModels, mContext.BusinessFlow, mContext, record, platformInfo);
            }
            else
            {
                mRecordingMngr = new RecordingManager(null, mContext.BusinessFlow, mContext, record, platformInfo);
            }

            mRecordingMngr.StartRecording();
        }
示例#23
0
        public ActUIElementEditPage(ActUIElement act)
        {
            InitializeComponent();
            mAction = act;
            ePlatformType ActivityPlatform = GetActionPlatform();

            mPlatform = PlatformInfoBase.GetPlatformImpl(ActivityPlatform);
            ElementTypeComboBox.BindControl(mAction, ActUIElement.Fields.ElementType, mPlatform.GetPlatformUIElementsType());
            ElementLocateByComboBox.BindControl(mAction, ActUIElement.Fields.ElementLocateBy, mPlatform.GetPlatformUIElementLocatorsList());
            ShowPlatformSpecificPage();
            ShowControlSpecificPage();

            if ((act.ElementType == eElementType.Unknown) && (act.ElementAction == ActUIElement.eElementAction.Unknown))
            {
                ElementLocateByComboBox.SelectedValue = Enum.GetName(typeof(eLocateBy), eLocateBy.POMElement);
            }
        }
示例#24
0
        public UIElementSelectAndValidate(ActUIElement Act, PlatformInfoBase Platform)
        {
            mAct      = Act;
            mPlatform = Platform;
            InitializeComponent();

            //TODO: Binding of all UI elements
            Value.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActUIElement.Fields.Value), true, false, UCValueExpression.eBrowserType.Folder);
            HandleElementType.BindControl(mAct, ActUIElement.Fields.HandleElementType, Platform.GetPlatformUIElementsType());
            HandleLocateByComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.HandleElementLocateBy), Platform.GetPlatformUIElementLocatorsList(), false, null);
            HandleLocatorValue.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActUIElement.Fields.HandleElementLocatorValue), true, false, UCValueExpression.eBrowserType.Folder);

            SubElement.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.SubElementType), Platform.GetSubElementType(mAct.ElementType).ToList(), false, null);
            SubElementLocateBy.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.SubElementLocateBy), Platform.GetPlatformUIElementLocatorsList(), false, null);
            SubElementLocatorValue.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActUIElement.Fields.SubElementLocatorValue), true, false, UCValueExpression.eBrowserType.Folder);
            GingerCore.General.ActInputValueBinding(DefineHandleAction, CheckBox.IsCheckedProperty, mAct.GetOrCreateInputParam(ActUIElement.Fields.DefineHandleAction, "False"));
        }
        private bool StartRecording()
        {
            IRecord       record       = (IRecord)mDriver;
            IPlatformInfo platformInfo = PlatformInfoBase.GetPlatformImpl(mContext.Platform);

            if (xIntegratePOM.IsChecked == true)
            {
                mRecordingMngr = new RecordingManager(mPomModels, mContext.BusinessFlow, mContext, record, platformInfo);
            }
            else
            {
                mRecordingMngr = new RecordingManager(null, mContext.BusinessFlow, mContext, record, platformInfo);
            }

            mRecordingMngr.RecordingNotificationEvent += RecordingMngr_RecordingNotificationEvent;
            return(mRecordingMngr.StartRecording());
        }
示例#26
0
        public ActUIElementEditPage(ActUIElement act)
        {
            InitializeComponent();
            mAction = act;
            if (act.Platform == ePlatformType.NA)
            {
                act.Platform = GetActionPlatform();
            }
            mPlatform = PlatformInfoBase.GetPlatformImpl(act.Platform);
            List <eLocateBy> LocateByList = mPlatform.GetPlatformUIElementLocatorsList();

            ElementLocateByComboBox.BindControl(mAction, nameof(ActUIElement.ElementLocateBy), LocateByList);
            ElementTypeComboBox.BindControl(mAction, nameof(ActUIElement.ElementType), mPlatform.GetPlatformUIElementsType());
            SetLocateValueFrame();
            ShowPlatformSpecificPage();
            ShowControlSpecificPage();
            ElementLocateByComboBox.SelectionChanged += ElementLocateByComboBox_SelectionChanged;
        }
        /// <summary>
        /// This method is used to check if the single target application supports POM or not?
        /// </summary>
        /// <returns></returns>
        private bool IsPOMSupportedFromSelectedTargetApplications()
        {
            bool isSupported = false;

            foreach (string targetapp in TargetAppList)
            {
                ePlatformType platform = (from x in WorkSpace.Instance.Solution.ApplicationPlatforms where x.AppName == targetapp select x.Platform).FirstOrDefault();
                if (platform != ePlatformType.NA && PlatformInfoBase.GetPlatformImpl(platform) != null)
                {
                    isSupported = PlatformInfoBase.GetPlatformImpl(platform).IsPlatformSupportPOM();
                    if (isSupported)
                    {
                        break;
                    }
                }
            }
            return(isSupported);
        }
示例#28
0
        private void SetDefaultPage()
        {
            if (mPOM.PageLoadFlow == ApplicationPOMModel.ePageLoadFlowType.PageURL)
            {
                xPageUrlRadioBtn.IsChecked = true;

                mAppPlatform = WorkSpace.Instance.Solution.GetTargetApplicationPlatform(mPOM.TargetApplicationKey);

                PlatformInfoBase platformInfoBase = PlatformInfoBase.GetPlatformImpl(mAppPlatform);
                if (platformInfoBase != null)
                {
                    xPageUrlRadioBtn.Content = platformInfoBase.GetPageUrlRadioLabelText();
                    xPageURLBtn.ToolTip      = platformInfoBase.GetNextBtnToolTip();
                }
            }
            else if (mPOM.PageLoadFlow == ApplicationPOMModel.ePageLoadFlowType.BusinessFlow)
            {
                xBusinessFlowRadioBtn.IsChecked = true;
            }
        }
示例#29
0
        public void SetDriver(IWindowExplorer windowExplorerDriver)
        {
            this.Dispatcher.Invoke(() =>
            {
                if (mDriver != windowExplorerDriver)
                {
                    mDriver = windowExplorerDriver;
                    xWindowSelectionUC.mWindowExplorerDriver = mDriver;
                    xWindowSelectionUC.mPlatform             = PlatformInfoBase.GetPlatformImpl(mContext.Platform);
                }

                if (windowExplorerDriver == null)
                {
                    xWindowSelectionUC.WindowsComboBox.ItemsSource = null;
                }

                if (windowExplorerDriver != null && xWindowSelectionUC.WindowsComboBox.ItemsSource == null)
                {
                    xWindowSelectionUC.UpdateWindowsList();
                }
            });
        }
        // when launching from Window explore we get also available actions to choose so user can add
        public ControlActionsPage_New(IWindowExplorer driver, ElementInfo ElementInfo, Context context, ElementActionCongifuration actionConfigurations, ITreeViewItem CurrentControlTreeViewItem)
        {
            InitializeComponent();

            mElementInfo          = ElementInfo;
            mWindowExplorerDriver = driver;
            mLocators             = mElementInfo.Locators; // mWindowExplorerDriver.GetElementLocators(mElementInfo);
            mContext = context;
            mCurrentControlTreeViewItem = CurrentControlTreeViewItem;
            mPlatform       = PlatformInfoBase.GetPlatformImpl(context.Platform);
            mDataPage       = mCurrentControlTreeViewItem.EditPage(mContext);
            mActInputValues = ((IWindowExplorerTreeItem)mCurrentControlTreeViewItem).GetItemSpecificActionInputValues();

            DefaultAction = (mPlatform as IPlatformInfo).GetPlatformAction(mElementInfo, actionConfigurations);

            IsLegacyPlatform = DefaultAction == null;

            ((GingerExecutionEngine)mContext.Runner).GingerRunner.PropertyChanged += Runner_PropertyChanged;
            SetPlatformBasedUIUpdates();

            //mAction.PropertyChanged -= Action_PropertyChanged;
            //mAction.PropertyChanged += Action_PropertyChanged;
        }