Exemplo n.º 1
0
 public void test()
 {
     GenerateBtn.Click();
     Cp1.Click();
     Cp2.Click();
     Cp3.Click();
     Cp4.Click();
     Cp5.Click();
     Cp6.Click();
     Cp7.Click();
     Cp8.Click();
     Cp9.Click();
     Cp10.Click();
     Thread.Sleep(800);
     Assert.IsTrue(Completed.Text.Contains("Good job"), "Not Completed");
     ClosePopUp.Click();
 }
Exemplo n.º 2
0
 public void test()
 {
     GenerateBtn.Click();
     for (int i = 2; i < 7; i++)
     {
         IWebElement         letter     = PropertiesCollection.driver.FindElement(By.XPath("/html/body/div[2]/div[1]/div[1]/div[2]/div/div[2]/div[2]/div[2]/table/tr[" + i + "]/td[1]"));
         IWebElement         ddl        = PropertiesCollection.driver.FindElement(By.XPath("/html/body/div[2]/div[1]/div[1]/div[2]/div/div[2]/div[2]/div[2]/table/tr[" + i + "]/td[2]/select"));
         SelectElement       selectList = new SelectElement(ddl);
         IList <IWebElement> options    = selectList.Options;
         for (int j = 1; j < 6; j++)
         {
             string optionText = options[j].Text.ToString();
             if (CheckLetter(letter.Text).Equals(optionText.Substring(0, 1)))
             {
                 SetMethods.SelectDropDown(ddl, optionText);
                 break;
             }
         }
     }
     SubmitBtn.Click();
     Thread.Sleep(800);
     Assert.IsTrue(Completed.Text.Contains("Good job"), "Not Completed");
     ClosePopUp.Click();
 }