Esempio n. 1
0
        public void SearchProfile(string SearchCriteria, string ProfileName)
        {
            if (SearchCriteria != null)
            {
                if (!SearchCriteriaList.SelectedOption.Text.Equals(SearchCriteria))
                {
                    SearchCriteriaList.SelectByText(SearchCriteria);
                }
            }

            SearchTextField.Set(ProfileName);
            ////SearchLink.Click();
            javaScriptExecutor.ExecuteScript("arguments[0].click();", SearchLink);
            // Thread.Sleep(5000);
            //webDriver.WaitForPageLoad(TimeSpan.FromSeconds(20));
            PageUtility.WaitForPageRefresh(webDriver);
        }
Esempio n. 2
0
 private void LoadSearches()
 {
     try
     {
         var configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), Path.Combine("conf", "SearchSettings.xml"));
         if (File.Exists(configFile))
         {
             using (FileStream fs = File.OpenRead(configFile))
             {
                 var scl = SearchCriteriaList.Deserialize(fs);
                 if (scl != null)
                 {
                     this.cboSavedSearches.Items.Clear();
                     this.cboSavedSearches.Items.AddRange(scl.Settings.OfType <object>().ToArray());
                 }
             }
         }
     }
     catch
     {
     }
 }