コード例 #1
0
        public void ChooseDropdownItem(string fieldName, string fieldValue)
        {
            var control = new WebDriverDropDownTextBoxEditText(Driver, Waiter, "dropDownTextBox editText");

            control.SelectValue(fieldName.ToLower());

            var dropDown = new WebDriverDropDown(Driver, Waiter, "div.armcontrol#clone" + _cloneNumber + " select", true);

            _cloneNumber++;

            dropDown.SetValue(fieldValue);
        }
コード例 #2
0
        public WebDriverNewAuditTypeConfigDialog(IWebDriver driver, WebDriverWait waiter, string id)
            : base(driver, waiter, "div#" + id)
        {
            Record        = new WebDriverDropDown(driver, waiter, "ACV_Record");
            Configuration = new WebDriverTextField(driver, waiter, "ACV_Configuration");

            Table = new FieldConfigurationTableControl(driver, waiter, id);

            OkButton     = new WebDriverButton(driver, waiter, "ACV_OK_btn");
            SaveButton   = new WebDriverButton(driver, waiter, "ACV_Save_btn");
            NewButton    = new WebDriverButton(driver, waiter, "ACV_New_btn");
            DeleteButton = new WebDriverButton(driver, waiter, "ACV_Delete_btn");
            CancelButton = new WebDriverButton(driver, waiter, "ACV_Cancel_btn");
            HelpButton   = new WebDriverButton(driver, waiter, "ACV_Help_btn");
        }
コード例 #3
0
        public WebDriverAuditTypeConfigDialog(IWebDriver driver, WebDriverWait waiter, string id) : base(driver, waiter, "div#" + id)
        {
            Record        = new WebDriverDropDown(driver, waiter, "ACV_Record");
            Configuration = new WebDriverDropDown(driver, waiter, "ACV_Configuration");

            SelectFieldCriteriaDropDown = new WebDriverDropDownTextBoxFilterItem(driver, waiter, "property");
            Operator          = new WebDriverDropDownTextBoxOperatorItem(driver, waiter, "operator");
            AddCriteriaButton = new WebDriverButton(driver, waiter, "ACV_FieldCriteria_AddCriteria_btn");

            Table = new FieldConfigurationTableControl(driver, waiter, id);

            OkButton     = new WebDriverButton(driver, waiter, "ACV_OK_btn");
            SaveButton   = new WebDriverButton(driver, waiter, "ACV_Save_btn");
            NewButton    = new WebDriverButton(driver, waiter, "ACV_New_btn");
            DeleteButton = new WebDriverButton(driver, waiter, "ACV_Delete_btn");
            CancelButton = new WebDriverButton(driver, waiter, "ACV_Cancel_btn");
            HelpButton   = new WebDriverButton(driver, waiter, "ACV_Help_btn");
        }
コード例 #4
0
        public void SelectOperatorWithCriteria(string operatorOption, string filterCriteria)
        {
            const string elementSelector = "tr.filter-criteria td.operator div.dropDownTextBox";
            var          elements        = Driver.FindElements(By.CssSelector(elementSelector));

            if (!elements.Any())
            {
                Assert.Fail("Could not find any items in the list '{0}'", elementSelector);
            }

            var operatorDropDown = elements.Last();

            operatorDropDown.Click();

            const string operatorMenuSelector = "tr.filter-criteria td.operator div.b-m-mpanel[key='cmroot']";
            var          operatorMenus        = Driver.FindElements(By.CssSelector(operatorMenuSelector));

            if (!operatorMenus.Any())
            {
                Assert.Fail("Could not find any items in the list '{0}'", operatorMenuSelector);
            }

            var operatorMenu = operatorMenus.Last();
            var operatorItem = operatorMenu.FindElement(By.CssSelector("div[title='" + operatorOption + "']"));

            operatorItem.Click();

            var criteriaDropDownSelector = "div.armcontrol[id^='clone']";
            var criteriaDropDowns        = Driver.FindElements(By.CssSelector(criteriaDropDownSelector));

            if (!criteriaDropDowns.Any())
            {
                Assert.Fail("Could not find any items in the list '{0}'", criteriaDropDownSelector);
            }

            var criteriaDropDown       = criteriaDropDowns.Last();
            var cloneId                = criteriaDropDown.GetAttribute("id");
            var filterCriteriaDropDown = new WebDriverDropDown(Driver, Waiter, "div.armcontrol#" + cloneId + " select", true);

            filterCriteriaDropDown.SetValue(filterCriteria);
        }