Пример #1
0
        ObservableList <Act> IWindowExplorerTreeItem.GetElementActions()
        {
            ObservableList <Act> list = new ObservableList <Act>();

            // click link the most common
            if (ASCFBrowserElementInfo.HasID())
            {
                list.Add(new ActASCFBrowserElement()
                {
                    Description   = "Click Button " + ASCFBrowserElementInfo.Name,
                    LocateBy      = eLocateBy.ByID,
                    LocateValue   = ASCFBrowserElementInfo.GetID(),
                    ControlAction = ActASCFBrowserElement.eControlAction.Click
                });
            }

            list.Add(new ActASCFBrowserElement()
            {
                Description   = "Click Button " + ASCFBrowserElementInfo.Name,
                LocateBy      = eLocateBy.ByXPath,
                LocateValue   = ASCFBrowserElementInfo.GetProperty("XPath"),
                ControlAction = ActASCFBrowserElement.eControlAction.Click
            });

            return(list);
        }
Пример #2
0
        ObservableList <Act> IWindowExplorerTreeItem.GetElementActions()
        {
            ObservableList <Act> list = new ObservableList <Act>();

            if (!string.IsNullOrEmpty(ASCFBrowserElementInfo.GetProperty("id")))
            {
                list.Add(new ActASCFBrowserElement()
                {
                    Description   = "Click",
                    LocateBy      = eLocateBy.ByID,
                    LocateValue   = ASCFBrowserElementInfo.GetProperty("id"),
                    ControlAction = ActASCFBrowserElement.eControlAction.Click
                });
            }

            if (!string.IsNullOrEmpty(ASCFBrowserElementInfo.GetProperty("name")))
            {
                list.Add(new ActASCFBrowserElement()
                {
                    Description   = "Click",
                    LocateBy      = eLocateBy.ByName,
                    LocateValue   = ASCFBrowserElementInfo.GetProperty("name"),
                    ControlAction = ActASCFBrowserElement.eControlAction.Click
                });
            }

            list.Add(new ActASCFBrowserElement()
            {
                Description   = "Click",
                LocateBy      = eLocateBy.ByXPath,
                LocateValue   = ASCFBrowserElementInfo.GetProperty("XPath"),
                ControlAction = ActASCFBrowserElement.eControlAction.Click
            });
            return(list);
        }
Пример #3
0
        ObservableList <Act> IWindowExplorerTreeItem.GetElementActions()
        {
            ObservableList <Act> list = new ObservableList <Act>();

            if (ASCFBrowserElementInfo.HasID())
            {
                list.Add(new ActASCFBrowserElement()
                {
                    Description   = "Set " + ASCFBrowserElementInfo.Name + " Checked",
                    LocateBy      = eLocateBy.ByID,
                    LocateValue   = ASCFBrowserElementInfo.GetID(),
                    ControlAction = ActASCFBrowserElement.eControlAction.SetValue,
                    Value         = "checked"
                });
            }

            list.Add(new ActASCFBrowserElement()
            {
                Description   = "Set Value",
                LocateBy      = eLocateBy.ByXPath,
                LocateValue   = ASCFBrowserElementInfo.GetProperty("XPath"),
                ControlAction = ActASCFBrowserElement.eControlAction.SetValue
            });
            return(list);
        }
Пример #4
0
        ObservableList <Act> IWindowExplorerTreeItem.GetElementActions()
        {
            ObservableList <Act>  list = new ObservableList <Act>();
            ActASCFBrowserElement a2   = new ActASCFBrowserElement();

            a2.Description   = "Set " + ASCFBrowserElementInfo.Path + " Value";
            a2.LocateBy      = eLocateBy.ByID;
            a2.LocateValue   = ASCFBrowserElementInfo.Path;
            a2.ControlAction = ActASCFBrowserElement.eControlAction.SetValue;
            a2.Value         = "ABC";
            list.Add(a2);

            ActASCFBrowserElement a1 = new ActASCFBrowserElement();

            a1.Description = "Get Value";
            a1.LocateBy    = eLocateBy.ByName;
            a1.LocateValue = ASCFBrowserElementInfo.Path;
            list.Add(a1);

            list.Add(new ActASCFBrowserElement()
            {
                Description   = "Set Value",
                LocateBy      = eLocateBy.ByXPath,
                LocateValue   = ASCFBrowserElementInfo.GetProperty("XPath"),
                ControlAction = ActASCFBrowserElement.eControlAction.SetValue
            });
            return(list);
        }
Пример #5
0
        public ASCFBrowserElementInfoPage(ASCFBrowserElementInfo EI)
        {
            InitializeComponent();

            ControlNameTextBox.Text = EI.Name;
            PathTextBox.Text        = EI.Path;
            ControlTypeTextBox.Text = EI.ControlType.ToString();
        }