コード例 #1
0
        public bool SelectTypeSearchCombineFields()
        {
            RunForm.Click();
            driver.SwitchTo().Window(driver.WindowHandles.ToList().Last());
            var selectElementSaveSearch = new SelectElement(ComboboxSaveSearch);

            selectElementSaveSearch.SelectByValue("1038052");
            Thread.Sleep(0500);
            RandomChoiceField1();
            Thread.Sleep(0500);
            RandomTextField1();
            RandomChoiceField2();
            Thread.Sleep(0500);
            RandomTextField2();
            RandomChoiceField3();
            Thread.Sleep(0500);;
            RandomTextField3();
            var selectDestinationField = new SelectElement(iDestinationField);

            selectDestinationField.SelectByValue("EmailTo");
            BtnRun.Click();
            driver.Close();
            driver.SwitchTo().Window(driver.WindowHandles.ToList().First());

            return(true);
        }
コード例 #2
0
        public bool SelectTypeSearch()
        {
            Thread.Sleep(0800);
            RunForm.Click();
            //cambia a la ultima ventana emergente abierta
            driver.SwitchTo().Window(driver.WindowHandles.ToList().Last());
            //Cambia a la primera ventana emergente
            //driver.SwitchTo().Window(driver.WindowHandles.ToList().First());
            //waitForPageUntilElementIsVisible(By.Id("searchId_dropDownList"), 10);
            var selectElementSaveSearch = new SelectElement(ComboboxSaveSearch);

            selectElementSaveSearch.SelectByValue("1038052");
            Thread.Sleep(0800);
            RandomField1();
            RandomField2();
            RandomField3();
            RandomField4();
            Delimiter.SendKeys("-");
            var selectElementFieldtoPopulate = new SelectElement(ComboboxFieldtoPopulate);

            selectElementFieldtoPopulate.SelectByValue("1042824");
            BtnRun.Click();
            driver.SwitchTo().Alert().Accept();
            driver.Close();
            driver.SwitchTo().Window(driver.WindowHandles.ToList().First());
            return(true);
        }
コード例 #3
0
 public string Run(string script)
 {
     NavigateTo();
     if (SelScript.SelectedOption.Contains(ScriptName))
     {
         SelScript.SelectOption(ScriptName);
         WaitForPageLoad();
     }
     else
     {
         BtnNew.Click();
         TxtScriptName.Value = ScriptName;
         BtnSave.Click();
     }
     TxtScript.Value = script;
     BtnRun.Click();
     WaitForPageLoad();
     return(TxtResult.Value);
 }