Inheritance: IControlAccess
コード例 #1
0
ファイル: WebControls.cs プロジェクト: geeksree/cSharpGeeks
 public WebControl(Browser aBrowser,LocatorType aLocatorType,string aLocator,ControlType aControlType)
 {
     myControlAccess = new ControlAccess();
     myControlAccess.Browser = aBrowser;
     myControlAccess.LocatorType = aLocatorType;
     myControlAccess.Locator = aLocator;
     myControlAccess.ControlType = aControlType;
     myControlAccess.IntializeControlAccess();
     //Control = myControlAccess.GetControl();
 }
コード例 #2
0
ファイル: WebControls.cs プロジェクト: geeksree/cSharpGeeks
 public WebControl(Browser aBrowser,Locator aLocator)
 {
     myControlAccess = new ControlAccess();
     myControlAccess.Browser = aBrowser;
     myControlAccess.LocatorType = aLocator.LocatorType;
     myControlAccess.Locator = aLocator.ControlLocator;
     myControlAccess.ControlType = ControlType.Custom;
     myControlAccess.IntializeControlAccess();
     //Control = myControlAccess.GetControl();
 }
コード例 #3
0
 internal SeleniumWebRadioButton(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 { }
コード例 #4
0
        internal static List <IControl> GetControlsFromWebElements(IEnumerable <IWebElement> aWebElements, ControlType aControlType, ControlAccess access)
        {
            List <IControl> aControl = new List <IControl>();

            foreach (IWebElement aWebElement in aWebElements)
            {
                if (aControlType == ControlType.Button)
                {
                    aControl.Add(new SeleniumWebButton(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.EditBox)
                {
                    aControl.Add(new SeleniumWebEditBox(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.Custom)
                {
                    aControl.Add(new SeleniumWebControls(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.Calender)
                {
                    aControl.Add(new SeleniumWebCalender(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.ComboBox)
                {
                    aControl.Add(new SeleniumWebCombobox(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.CheckBox)
                {
                    aControl.Add(new SeleniumWebCheckBox(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.Dialog)
                {
                    aControl.Add(new SeleniumWebDialog(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.Frame)
                {
                    aControl.Add(new SeleniumWebFrame(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.Image)
                {
                    aControl.Add(new SeleniumWebImage(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.Label)
                {
                    aControl.Add(new SeleniumWebLabel(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.Link)
                {
                    aControl.Add(new SeleniumWebLink(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.ListBox)
                {
                    aControl.Add(new SeleniumWebListBox(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.Page)
                {
                    aControl.Add(new SeleniumWebPage(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.RadioButton)
                {
                    aControl.Add(new SeleniumWebRadioButton(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.SpanArea)
                {
                    aControl.Add(new SeleniumWebSpanArea(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.WebTable)
                {
                    aControl.Add(new SeleniumWebTable(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.WebRow)
                {
                    aControl.Add(new SeleniumWebRow(aWebElement, aControlType, access));
                }

                if (aControlType == ControlType.WebCell)
                {
                    aControl.Add(new SeleniumWebCell(aWebElement, aControlType, access));
                }
            }

            return(aControl);
        }
コード例 #5
0
        internal static IControl GetControlFromWebElement(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
        {
            if (aControlType == ControlType.Button)
            {
                return(new SeleniumWebButton(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.EditBox)
            {
                return(new SeleniumWebEditBox(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.Calender)
            {
                return(new SeleniumWebCalender(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.Custom)
            {
                return(new SeleniumWebControls(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.ComboBox)
            {
                return(new SeleniumWebCombobox(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.CheckBox)
            {
                return(new SeleniumWebCheckBox(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.Dialog)
            {
                return(new SeleniumWebDialog(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.Frame)
            {
                return(new SeleniumWebFrame(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.Image)
            {
                return(new SeleniumWebImage(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.Label)
            {
                return(new SeleniumWebLabel(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.Link)
            {
                return(new SeleniumWebLink(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.ListBox)
            {
                return(new SeleniumWebListBox(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.Page)
            {
                return(new SeleniumWebPage(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.RadioButton)
            {
                return(new SeleniumWebRadioButton(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.SpanArea)
            {
                return(new SeleniumWebSpanArea(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.WebTable)
            {
                return(new SeleniumWebTable(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.WebRow)
            {
                return(new SeleniumWebRow(aWebElement, aControlType, access));
            }

            if (aControlType == ControlType.WebCell)
            {
                return(new SeleniumWebCell(aWebElement, aControlType, access));
            }

            else
            {
                return(null);
            }
        }
コード例 #6
0
        internal static List <IControl> GetChildren(string Locator, LocatorType aLocatorType, ControlType aControlType, IWebElement aWebElement, ControlAccess access)
        {
            if (aLocatorType == LocatorType.Id)
            {
                return(Utility.GetControlsFromWebElements(aWebElement.FindElements(By.Id(Locator)), aControlType, access));
            }

            if (aLocatorType == LocatorType.Name)
            {
                return(Utility.GetControlsFromWebElements(aWebElement.FindElements(By.Name(Locator)), aControlType, access));
            }

            if (aLocatorType == LocatorType.TagName)
            {
                return(Utility.GetControlsFromWebElements(aWebElement.FindElements(By.TagName(Locator)), aControlType, access));
            }

            if (aLocatorType == LocatorType.Xpath)
            {
                return(Utility.GetControlsFromWebElements(aWebElement.FindElements(By.XPath(Locator)), aControlType, access));
            }

            if (aLocatorType == LocatorType.ClassName)
            {
                return(Utility.GetControlsFromWebElements(aWebElement.FindElements(By.ClassName(Locator)), aControlType, access));
            }

            if (aLocatorType == LocatorType.Css)
            {
                return(Utility.GetControlsFromWebElements(aWebElement.FindElements(By.CssSelector(Locator)), aControlType, access));
            }

            if (aLocatorType == LocatorType.LinkText)
            {
                return(Utility.GetControlsFromWebElements(aWebElement.FindElements(By.LinkText(Locator)), aControlType, access));
            }

            if (aLocatorType == LocatorType.PartialLinkText)
            {
                return(Utility.GetControlsFromWebElements(aWebElement.FindElements(By.PartialLinkText(Locator)), aControlType, access));
            }

            else
            {
                return(null);
            }
        }
コード例 #7
0
ファイル: Utility.cs プロジェクト: geeksree/cSharpGeeks
        internal static List<IControl> GetChildren(string Locator, LocatorType aLocatorType, ControlType aControlType, IWebElement aWebElement, ControlAccess access)
        {
            if (aLocatorType == LocatorType.Id)
            {
                return Utility.GetControlsFromWebElements(aWebElement.FindElements(By.Id(Locator)), aControlType, access);
            }

            if (aLocatorType == LocatorType.Name)
            {
                return Utility.GetControlsFromWebElements(aWebElement.FindElements(By.Name(Locator)), aControlType, access);
            }

            if (aLocatorType == LocatorType.TagName)
            {
                return Utility.GetControlsFromWebElements(aWebElement.FindElements(By.TagName(Locator)), aControlType, access);
            }

            if (aLocatorType == LocatorType.Xpath)
            {
                return Utility.GetControlsFromWebElements(aWebElement.FindElements(By.XPath(Locator)), aControlType, access);
            }

            if (aLocatorType == LocatorType.ClassName)
            {
                return Utility.GetControlsFromWebElements(aWebElement.FindElements(By.ClassName(Locator)), aControlType, access);
            }

            if (aLocatorType == LocatorType.Css)
            {
                return Utility.GetControlsFromWebElements(aWebElement.FindElements(By.CssSelector(Locator)), aControlType, access);
            }

            if (aLocatorType == LocatorType.LinkText)
            {
                return Utility.GetControlsFromWebElements(aWebElement.FindElements(By.LinkText(Locator)), aControlType, access);
            }

            if (aLocatorType == LocatorType.PartialLinkText)
            {
                return Utility.GetControlsFromWebElements(aWebElement.FindElements(By.PartialLinkText(Locator)), aControlType, access);
            }

            else return null;
        }
コード例 #8
0
 internal SeleniumWebSpanArea(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType, access)
 {
 }
コード例 #9
0
 internal SeleniumWebEditBox(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType, access)
 {
 }
コード例 #10
0
 internal SeleniumWebRadioButton(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType, access)
 {
 }
コード例 #11
0
 internal SeleniumWebControls(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : this(aWebElement, aControlType)
 {
     this.aControlAccess = access;
 }
コード例 #12
0
 public List <IControl> GetChildren(string Locator, LocatorType aLocatorType, ControlType aControlType, ControlAccess access)
 {
     return(Utility.GetChildren(Locator, aLocatorType, aControlType, aWebElement, access));
 }
コード例 #13
0
 internal SeleniumWebControls(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : this(aWebElement, aControlType)
 {
     this.aControlAccess = access;
 }
コード例 #14
0
 public List<IControl> GetChildren(string Locator, LocatorType aLocatorType, ControlType aControlType, ControlAccess access)
 {
     return Utility.GetChildren(Locator, aLocatorType, aControlType, aWebElement, access);
 }
コード例 #15
0
ファイル: Utility.cs プロジェクト: geeksree/cSharpGeeks
        internal static List<IControl> GetControlsFromWebElements(IEnumerable<IWebElement> aWebElements, ControlType aControlType, ControlAccess access)
        {
            List<IControl> aControl = new List<IControl>();

            foreach (IWebElement aWebElement in aWebElements)
            {
                if (aControlType == ControlType.Button)
                {
                    aControl.Add(new SeleniumWebButton(aWebElement, aControlType,access));
                }

                if (aControlType == ControlType.EditBox)
                {
                    aControl.Add(new SeleniumWebEditBox(aWebElement, aControlType, access));
                }
                
                 if (aControlType == ControlType.Custom)
                {
                    aControl.Add(new SeleniumWebControls(aWebElement, aControlType, access));
                }

                 if (aControlType == ControlType.Calender)
                 {
                     aControl.Add(new SeleniumWebCalender(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.ComboBox)
                 {
                     aControl.Add(new SeleniumWebCombobox(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.CheckBox)
                 {
                     aControl.Add(new SeleniumWebCheckBox(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.Dialog)
                 {
                     aControl.Add(new SeleniumWebDialog(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.Frame)
                 {
                     aControl.Add(new SeleniumWebFrame(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.Image)
                 {
                     aControl.Add(new SeleniumWebImage(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.Label)
                 {
                     aControl.Add(new SeleniumWebLabel(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.Link)
                 {
                     aControl.Add(new SeleniumWebLink(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.ListBox)
                 {
                     aControl.Add(new SeleniumWebListBox(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.Page)
                 {
                     aControl.Add(new SeleniumWebPage(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.RadioButton)
                 {
                     aControl.Add(new SeleniumWebRadioButton(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.SpanArea)
                 {
                     aControl.Add(new SeleniumWebSpanArea(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.WebTable)
                 {
                     aControl.Add(new SeleniumWebTable(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.WebRow)
                 {
                     aControl.Add(new SeleniumWebRow(aWebElement, aControlType, access));
                 }

                 if (aControlType == ControlType.WebCell)
                 {
                     aControl.Add(new SeleniumWebCell(aWebElement, aControlType, access));
                 }

            }

            return aControl;
        }
コード例 #16
0
ファイル: Utility.cs プロジェクト: geeksree/cSharpGeeks
        internal static IControl GetControlFromWebElement(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
        {
            if (aControlType == ControlType.Button)
            {
                return new SeleniumWebButton(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.EditBox)
            {
                return new SeleniumWebEditBox(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.Calender)
            {
                return new SeleniumWebCalender(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.Custom)
            {
                return new SeleniumWebControls(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.ComboBox)
            {
                return new SeleniumWebCombobox(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.CheckBox)
            {
                return new SeleniumWebCheckBox(aWebElement, aControlType,access);
            }

            if (aControlType == ControlType.Dialog)
            {
                return new SeleniumWebDialog(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.Frame)
            {
                return new SeleniumWebFrame(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.Image)
            {
                return new SeleniumWebImage(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.Label)
            {
                return new SeleniumWebLabel(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.Link)
            {
                return new SeleniumWebLink(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.ListBox)
            {
                return new SeleniumWebListBox(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.Page)
            {
                return new SeleniumWebPage(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.RadioButton)
            {
                return new SeleniumWebRadioButton(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.SpanArea)
            {
                return new SeleniumWebSpanArea(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.WebTable)
            {
                return new SeleniumWebTable(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.WebRow)
            {
                return new SeleniumWebRow(aWebElement, aControlType, access);
            }

            if (aControlType == ControlType.WebCell)
            {
                return new SeleniumWebCell(aWebElement, aControlType, access);
            }

            else return null;
        }
コード例 #17
0
 internal SeleniumWebTable(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 {
     controlAccess = access;
 }
コード例 #18
0
 internal SeleniumWebTable(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType, access)
 {
     controlAccess = access;
 }
コード例 #19
0
 internal SeleniumWebSpanArea(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 { }
コード例 #20
0
 internal SeleniumWebDialog(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 { }
コード例 #21
0
 internal SeleniumWebCheckBox(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 { }
コード例 #22
0
ファイル: Actions.cs プロジェクト: geeksree/cSharpGeeks
 public Actions(ControlAccess controlAccess)
 {
     thisControlAccess = controlAccess;
 }