예제 #1
0
        public static void CreatePackageMandatoryTest()
        {
            var    rand          = new Random();
            int    val           = rand.Next(999999);
            string Containarname = "Containar" + val;
            string Assetname     = "Asset" + val;
            string Iterationname = "Iteration" + val;
            string Candidatename = "Candidate" + val;

            AppDriver.driver.FindElement(By.LinkText("Home")).Click();
            AppClass.CreatePackageContainer(Containarname, "Persistent", "Reach", "");
            AppClass.CreateAssetPackage(Assetname, Containarname, "", "", "", "");
            AppClass.createiteration(Assetname, Iterationname);
            AppClass.createcandidate(Iterationname, Candidatename);
        }
        public static void CreatePackage()
        {
            var    rand          = new Random();
            int    val           = rand.Next(999999);
            string Containarname = "Containar" + val;
            string Assetname     = "Asset" + val;
            string Iterationname = "Iteration" + val;
            string Candidatename = "Candidate" + val;

            AppDriver.driver.FindElement(By.LinkText("Home")).Click();
            AppClass.CreatePackageContainer(Containarname, "Persistent", "Reach", "notes");
            AppClass.CreateAssetPackage(Assetname, Containarname, "Hypothesis", "Problem", "ProblemValidation", "notes");
            AppClass.createiteration(Assetname, Iterationname);
            AppClass.createcandidate(Iterationname, Candidatename);
            AppClass.CreatePackageContainer("DynamicCont" + val, "Dynamic", "Act", "notes");
        }
예제 #3
0
        public static void ExperimentsMandatoryTest()
        {
            AppDriver.driver.FindElement(By.LinkText("Home")).Click();

            AppDriver.driver.FindElement(By.LinkText("Package Entities")).Click();
            AppDriver.driver.FindElement(By.LinkText("Experiments")).Click();
            AppDriver.driver.FindElement(By.LinkText("Create New")).Click();
            AppDriver.driver.FindElement(By.XPath("//input[@value='Save']")).Click();

            bool   AssetPackageerror    = AppClass.IsElementPresent(By.XPath("//div/span"));
            string AssetPackagerrortext = AppDriver.driver.FindElement(By.XPath("//div/span")).Text;

            Assert.IsTrue(AssetPackageerror);
            Assert.AreEqual(AssetPackagerrortext, "The Marketing Asset Package field is required.");

            bool   Experimenterror     = AppClass.IsElementPresent(By.XPath("//div[4]/div/span"));
            string Experimenterrortext = AppDriver.driver.FindElement(By.XPath("//div[4]/div/span")).Text;

            Assert.IsTrue(Experimenterror);
            Assert.AreEqual(Experimenterrortext, "The Experiment Name field is required.");

            AppDriver.driver.FindElement(By.LinkText("Back to List")).Click();
        }
        public static void MarketingAssetMandatoryTest()
        {
            AppDriver.driver.FindElement(By.LinkText("Home")).Click();

            AppDriver.driver.FindElement(By.LinkText("Package Entities")).Click();
            AppDriver.driver.FindElement(By.LinkText("Marketing Asset Packages")).Click();
            AppDriver.driver.FindElement(By.LinkText("Create New")).Click();
            AppDriver.driver.FindElement(By.XPath("//input[@value='Save']")).Click();

            bool   MAPNameerror      = AppClass.IsElementPresent(By.XPath("//*[@id='MAPName-error']"));
            string MAPrNameerrortext = AppDriver.driver.FindElement(By.XPath("//*[@id='MAPName-error']")).Text;

            Assert.IsTrue(MAPNameerror);
            Assert.AreEqual(MAPrNameerrortext, "The Package Name field is required.");

            bool   ContainerIderror     = AppClass.IsElementPresent(By.XPath("//*[@id='PackageContainerId-error']"));
            string ContainerIderrortext = AppDriver.driver.FindElement(By.XPath("//*[@id='PackageContainerId-error']")).Text;

            Assert.IsTrue(ContainerIderror);
            Assert.AreEqual(ContainerIderrortext, "The Container field is required.");

            AppDriver.driver.FindElement(By.LinkText("Back to List")).Click();
        }
        public static void MarketingAssetUpdateTest()
        {
            AppDriver.driver.FindElement(By.LinkText("Home")).Click();

            AppDriver.driver.FindElement(By.LinkText("Package Entities")).Click();
            AppDriver.driver.FindElement(By.LinkText("Marketing Asset Packages")).Click();
            AppDriver.driver.FindElement(By.XPath("//table/tbody/tr[2]/td[1]/a")).Click();

            string text = AppDriver.driver.FindElement(By.Id("MAPName")).Text;

            AppDriver.driver.FindElement(By.Id("MAPName")).SendKeys(text + 1);
            AppDriver.driver.FindElement(By.XPath("//input[@value='Save']")).Click();
            AppDriver.driver.FindElement(By.Id("MAPName")).Clear();
            AppDriver.driver.FindElement(By.XPath("//input[@value='Save']")).Click();

            bool   MAPNameerror      = AppClass.IsElementPresent(By.XPath("//*[@id='MAPName-error']"));
            string MAPrNameerrortext = AppDriver.driver.FindElement(By.XPath("//*[@id='MAPName-error']")).Text;

            Assert.IsTrue(MAPNameerror);
            Assert.AreEqual(MAPrNameerrortext, "The Package Name field is required.");

            AppDriver.driver.FindElement(By.LinkText("Back to List")).Click();
        }
        public static void VariantUpdateTest()
        {
            Candidate cpage = new Candidate();

            AppDriver.driver.FindElement(By.LinkText("Home")).Click();

            AppDriver.driver.FindElement(By.LinkText("Package Entities")).Click();
            AppDriver.driver.FindElement(By.LinkText("Variants")).Click();
            AppDriver.driver.FindElement(By.XPath("//table/tbody/tr[2]/td[2]/a")).Click();
            string text = cpage.VariantName.Text;

            cpage.VariantName.SendKeys(text + 1);
            AppDriver.driver.FindElement(By.XPath("//input[@value='Save']")).Click();
            cpage.VariantName.Clear();
            AppDriver.driver.FindElement(By.XPath("//input[@value='Save']")).Click();

            bool   Variantnameerror     = AppClass.IsElementPresent(By.XPath("//div[5]/div/span"));
            string Variantnameerrortext = AppDriver.driver.FindElement(By.XPath("//div[5]/div/span")).Text;

            Assert.IsTrue(Variantnameerror);
            Assert.AreEqual(Variantnameerrortext, "The Variant Name field is required.");

            AppDriver.driver.FindElement(By.LinkText("Back to List")).Click();
        }
예제 #7
0
        public static void DeleteProgram()
        {
            StatNav spage = new StatNav();

            AppDriver.wait.Until(ExpectedConditions.ElementToBeClickable(spage.Programmes));
            spage.Programmes.Click();

            try
            {
                IAlert aler = AppDriver.driver.SwitchTo().Alert();
                aler.Accept();
            }
            catch (NoAlertPresentException ex)
            {
                ex.Message.ToString();
            }

            AppDriver.wait.Until(ExpectedConditions.ElementToBeClickable(spage.Programmes));
            spage.Programmes.Click();

            AppClass.deleteprogrammethod();

            spage.Logout.Click();
        }
예제 #8
0
        public static void ExperimentUpdateTest()
        {
            Iterations ipage = new Iterations();

            AppDriver.driver.FindElement(By.LinkText("Home")).Click();

            AppDriver.driver.FindElement(By.LinkText("Package Entities")).Click();
            AppDriver.driver.FindElement(By.LinkText("Experiments")).Click();
            AppDriver.driver.FindElement(By.XPath("//table/tbody/tr[2]/td[2]/a")).Click();
            string text = ipage.ExperimentName.Text;

            ipage.ExperimentName.SendKeys(text + 1);
            AppDriver.driver.FindElement(By.XPath("//input[@value='Save']")).Click();
            ipage.ExperimentName.Clear();
            AppDriver.driver.FindElement(By.XPath("//input[@value='Save']")).Click();

            bool   Experimenterror     = AppClass.IsElementPresent(By.XPath("//div[5]/div/span"));
            string Experimenterrortext = AppDriver.driver.FindElement(By.XPath("//div[5]/div/span")).Text;

            Assert.IsTrue(Experimenterror);
            Assert.AreEqual(Experimenterrortext, "The Experiment Name field is required.");

            AppDriver.driver.FindElement(By.LinkText("Back to List")).Click();
        }
 public void Initialization()
 {
     Utils.DriverSetup();
     AppDriver.driver = new TWebDriver();
     AppClass.StatNavLogin();
 }