Inheritance: IControlAccess
Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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();
 }
 internal SeleniumWebRadioButton(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 { }
Exemplo n.º 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);
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 7
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;
        }
 internal SeleniumWebSpanArea(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType, access)
 {
 }
 internal SeleniumWebEditBox(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType, access)
 {
 }
Exemplo n.º 10
0
 internal SeleniumWebRadioButton(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType, access)
 {
 }
 internal SeleniumWebControls(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : this(aWebElement, aControlType)
 {
     this.aControlAccess = access;
 }
 public List <IControl> GetChildren(string Locator, LocatorType aLocatorType, ControlType aControlType, ControlAccess access)
 {
     return(Utility.GetChildren(Locator, aLocatorType, aControlType, aWebElement, access));
 }
Exemplo n.º 13
0
 internal SeleniumWebControls(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : this(aWebElement, aControlType)
 {
     this.aControlAccess = access;
 }
Exemplo n.º 14
0
 public List<IControl> GetChildren(string Locator, LocatorType aLocatorType, ControlType aControlType, ControlAccess access)
 {
     return Utility.GetChildren(Locator, aLocatorType, aControlType, aWebElement, access);
 }
Exemplo n.º 15
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;
        }
Exemplo n.º 16
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;
        }
Exemplo n.º 17
0
 internal SeleniumWebTable(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 {
     controlAccess = access;
 }
 internal SeleniumWebTable(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType, access)
 {
     controlAccess = access;
 }
Exemplo n.º 19
0
 internal SeleniumWebSpanArea(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 { }
Exemplo n.º 20
0
 internal SeleniumWebDialog(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 { }
Exemplo n.º 21
0
 internal SeleniumWebCheckBox(IWebElement aWebElement, ControlType aControlType, ControlAccess access)
     : base(aWebElement, aControlType,access)
 { }
Exemplo n.º 22
0
 public Actions(ControlAccess controlAccess)
 {
     thisControlAccess = controlAccess;
 }