コード例 #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 (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);
        }