Exemple #1
0
        public BRBaseWidget(string locator, LocatorTypes locatorType, string controlType, string displayName)
        {
            Locator     = locator;
            ControlType = controlType;
            DisplayName = displayName;
            LocatorType = locatorType;
            By m_By = GetFindBy();

            FindBy = m_By;
        }
Exemple #2
0
        protected By GetFindBy(LocatorTypes LocatorType, params string[] locator)
        {
            if (locator.Length != 1)
            {
                Locator = locator[0];
            }
            By by = null;

            try
            {
                switch (LocatorType)
                {
                case LocatorTypes.ID:
                    by = By.Id(Locator);
                    break;

                case LocatorTypes.TAGNAME:
                    by = By.TagName(Locator);
                    break;

                case LocatorTypes.LINKTEXT:
                    by = By.LinkText(Locator);
                    break;

                case LocatorTypes.CLASS:
                    by = By.ClassName(Locator);
                    break;

                case LocatorTypes.CSS:
                    by = By.CssSelector(Locator);
                    break;

                case LocatorTypes.NAME:
                    by = By.Name(Locator);
                    break;

                case LocatorTypes.XPATH:
                    by = By.XPath(Locator);
                    break;
                }
            }
            catch (Exception e)
            {
            }


            return(by);
        }
Exemple #3
0
 public BRTextBox(string locator, LocatorTypes locatorType, string controlType, string displayName) : base(locator, locatorType, controlType, displayName)
 {
 }
Exemple #4
0
 public BRTextBox(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "TextBox", displayName)
 {
 }
 public BRLink(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "Link", displayName)
 {
 }
Exemple #6
0
 public BRCard(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "CARD", displayName)
 {
     ;
 }
 public BRTabularData(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "TabularData", displayName)
 {
 }
 public BRDatePicker(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "DatePicker", displayName)
 {
 }
 public BRFilter(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "Filter", displayName)
 {
 }
Exemple #10
0
 public BRDropDownList(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "DropDownList", displayName)
 {
 }
 public BRFieldSet(string Locator, LocatorTypes locatorType, string DisplayName) : base(Locator, locatorType, "fieldset", DisplayName)
 {
 }
Exemple #12
0
 public static By GetByLocator(LocatorTypes type, string path)
 {
     return((By)typeof(By).GetMethod(type.ToString()).Invoke(null, new object[] { path }));
 }
 public BRSelect(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "Select", displayName)
 {
 }
Exemple #14
0
 public BRCheckbox(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "Checkbox", displayName)
 {
 }
 public BRTable(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "Table", displayName)
 {
 }
 public BRMenu(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "Menu", displayName)
 {
 }
 public BRAutoCompleteFilter(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "AutoCompleteFilter", displayName)
 {
 }
Exemple #18
0
 //the grid
 public BRGrid(string locator, LocatorTypes locatorTypes, string displayName) : base(locator, locatorTypes, "Grid", displayName)
 {
 }
Exemple #19
0
 public BRImage(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "Image", displayName)
 {
 }
 public BRRadioButton(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "Radio Button", displayName)
 {
 }
        // public BRToggleButton(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType,"Button", displayName) { }

        public BRToggleButton(string locator, LocatorTypes locatorType, string displayName) : base(locator, locatorType, "Button", displayName)
        {
        }