Ejemplo n.º 1
0
        public static void FillAdvancedSearch(IWebDriver driver)
        {
            for (int i = 0; i < advancedSearchData.Count; i++)
            {
                tmpScopeXPath     = string.Format("//select[@id = 'dplScope_{0}']", i + 1);
                tempScope.locator = By.XPath(tmpScopeXPath);
                tempScope.name    = advancedSearchData.ElementAt(i).Key;
                SelectElement select = new SelectElement(tempScope.getElement(driver));
                logger.Info("Selecting {0} in {1} scope, its Locator: {2}", tempScope.name, i + 1, tempScope.locator);
                select.SelectByValue(tempScope.name);

                tmpKeyXPath       = string.Format("//input[@id = 'keywords_input_{0}']", i + 1);
                tempLabel.locator = By.XPath(tmpKeyXPath);
                tempLabel.FillLabel(advancedSearchData.ElementAt(i).Value, driver);
            }
            if (multiJourn.getElement(driver) != null)
            {
                checkBoxes = /*Singleton.getInstance()*/ driver.FindElements(multiJourn.locator).ToList();
                foreach (var checkbox in checkBoxes)
                {
                    if (!checkbox.Selected)
                    {
                        logger.Info("Selecting Check Box");
                        checkbox.Click();
                    }
                }
            }
        }