Exemplo n.º 1
0
        private void ElementTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ElementLocateByComboBox.IsEnabled = true;
            if (!String.IsNullOrEmpty(ElementTypeComboBox.SelectionBoxItem.ToString()))
            {
                if (ElementTypeComboBox.SelectedValue != null && !String.IsNullOrEmpty(ElementTypeComboBox.SelectedValue.ToString()))
                {
                    if (ElementTypeComboBox.SelectedValue.ToString() != ElementTypeComboBox.SelectionBoxItem.ToString())
                    {
                        ResetActUIFields();
                    }
                }
            }
            List <ActUIElement.eElementAction> list = mPlatform.GetPlatformUIElementActionsList(mAction.ElementType);

            ElementTypeImage.Source = GetImageSource(mAction.Image);
            ElementActionComboBox.BindControlWithGrouping(mAction, ActUIElement.Fields.ElementAction, list);
            UpdateActionInfo(mAction.ElementAction);
            UIElementActionEditPageFrame.Visibility = Visibility.Collapsed;
            if (mAction.ElementType != eElementType.Unknown && mAction.ElementAction != ActUIElement.eElementAction.Unknown)
            {
                ShowControlSpecificPage();
            }
            ElementTypeComboBox.Refresh();
        }
Exemplo n.º 2
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();
        }
Exemplo n.º 3
0
 private void BindElementTypeComboBox()
 {
     ElementTypeComboBox.Items.Clear();
     if (Convert.ToBoolean(mAction.GetInputParamValue(Fields.IsWidgetsElement)))
     {
         ElementTypeComboBox.BindControl(mAction, nameof(ActUIElement.ElementType), mPlatform.GetPlatformWidgetsUIElementsType());
     }
     else
     {
         ElementTypeComboBox.BindControl(mAction, nameof(ActUIElement.ElementType), mPlatform.GetPlatformUIElementsType());
     }
 }
Exemplo n.º 4
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);
            }
        }
Exemplo n.º 5
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;
        }