Example #1
0
 public QuestionPage TypeSearchTextAndSelect(string pathway)
 {
     SearchTxtBox.Clear();
     SearchTxtBox.SendKeys(pathway);
     this.ClickGoButton();
     new WebDriverWait(_driver, TimeSpan.FromSeconds(5)).Until(ExpectedConditions.ElementIsVisible(By.XPath("//div[@class='results-list']/ul/li")));
     _driver.FindElement(By.XPath("//div[@class='results-list']/ul/li/a[@data-title='" + pathway + "']")).Click();
     return(new QuestionPage(_driver));
 }
Example #2
0
 public QuestionPage TypeSearchTextAndSelect(string pathway)
 {
     SearchTxtBox.Clear();
     SearchTxtBox.SendKeys(pathway);
     this.ClickNextButton();
     new WebDriverWait(Driver, TimeSpan.FromSeconds(5)).Until(ExpectedConditions.ElementIsVisible(By.XPath("//ul[contains(@class, 'link-list') and contains(@class, 'link-list--results')]/li")));
     Driver.FindElement(By.XPath("//ul[contains(@class, 'link-list') and contains(@class, 'link-list--results')]/li/a[@data-title='" + pathway + "']")).Click();
     return(new QuestionPage(Driver));
 }
Example #3
0
        /// <summary>
        /// Bug already logged. Search button doesn't work rather user Enter key
        /// Method to Search device based on serial, name, ip address
        /// </summary>
        /// <param name="deviceinfo"></param>
        public List <DeviceListModel> SearchDevice(string deviceinfo)
        {
            try
            {
                WaitElementToBeClickable(SearchBtn);
                ClickElement(SearchBtn);
                EnterValueTextbox(SearchTxtBox, deviceinfo);
                SearchTxtBox.SendKeys(Keys.Enter);

                Logger.Info("Searched devices with criteria: " + deviceinfo);
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "Failed to Search Device");
                throw;
            }
            return(GetDeviceListDetails());
        }
Example #4
0
 public void SearchByTerm(string term)
 {
     SearchTxtBox.Clear();
     SearchTxtBox.SendKeys(term);
     ClickNextButton();
 }