Ejemplo n.º 1
0
        public void CreateTMnValidate()
        {
            //Class for Home page,
            // method to verify the home
            // method to click adminstration
            // method to click time n material

            HomePage homeInstance = new HomePage(driver);

            homeInstance.VerifyHomePage();
            homeInstance.ClickAdminstration();
            homeInstance.ClickTimenMaterial();

            TimenMaterialPage tmPage = new TimenMaterialPage();

            tmPage.ClickCreateNew(driver);
            tmPage.EnterValidDataandSave(driver);
            tmPage.ValidateData(driver);
            //tmPage.DeleteTMVadition(driver);

            //static class
            //StaticClass.StaticMethod();
            //comment a line ctrl +k + c
            //uncomment a line ctrl +k + u
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // Browser initiate
            IWebDriver driver = new ChromeDriver();

            //navigate to horse-dev
            driver.Navigate().GoToUrl("http://horse-dev.azurewebsites.net/Account/Login?ReturnUrl=%2f");

            //maximize t
            driver.Manage().Window.Maximize();

            //access loginsucess method

            // an instance of class
            LoginPage loginInstance = new LoginPage();

            loginInstance.LoginSuccess(driver);

            //Class for Home page,
            // method to verify the home
            // method to click adminstration
            // method to click time n material

            HomePage homeInstance = new HomePage();

            homeInstance.VerifyHomePage(driver);
            homeInstance.ClickAdminstration(driver);
            homeInstance.ClickTimenMaterial(driver);


            TimenMaterialPage tmPage = new TimenMaterialPage();

            tmPage.ClickCreateNew(driver);
            string code        = "ICAug19";
            string description = "Selenium Training";
            string price       = "$155.00";

            tmPage.EnterValidDataandSave(driver, code, description, price);
            tmPage.ValidateData(driver, code, description, price);

            // to stop console from closing.
            Console.ReadLine();

            //Close the driver
            driver.Quit();

            //static class
            //StaticClass.StaticMethod();
            //comment a line ctrl +k + c
            //uncomment a line ctrl +k + u
        }
Ejemplo n.º 3
0
        public void EditnValidate()
        {
            HomePage homeInstance = new HomePage(driver);

            homeInstance.VerifyHomePage();
            homeInstance.ClickAdminstration();
            homeInstance.ClickTimenMaterial();

            TimenMaterialPage tmPage = new TimenMaterialPage(driver);
            string            result = tmPage.EditValidDataandSave("Material", "ICAug19", "Selenium Training", "$155.00", "Time", "ICAug19_edit", "Selenium Training Edit", "$200");

            Assert.IsTrue("success" == result, "Edit failed");
            Assert.IsTrue("RecordFound" == tmPage.ValidateData("Time", "ICAug19_edit", "Selenium Training Edit", "$200.00"), "Validate failed");
        }
Ejemplo n.º 4
0
        public void DeletenValidate()
        {
            HomePage homeInstance = new HomePage(driver);

            homeInstance.ClickAdminstration();
            homeInstance.ClickTimenMaterial();

            TimenMaterialPage tmPage = new TimenMaterialPage(driver);

            Assert.IsTrue("success" == tmPage.DeleteData("Material", "ICAug19", "Selenium Training", "$155.00", "ok"), "Delete Failed");

            homeInstance.ClickAdminstration();
            homeInstance.ClickTimenMaterial();
            Assert.IsFalse("RecordFound" == tmPage.ValidateData("Material", "ICAug19", "Selenium Training", "$155.00"), "Validate Failed");
        }
Ejemplo n.º 5
0
        public void CreateTMnValidate()
        {
            string   typecode     = "Material";
            string   code         = "ICAug19";
            string   description  = "Selenium Training";
            string   price        = "$155.00";
            HomePage homeInstance = new HomePage(driver);

            homeInstance.VerifyHomePage();
            homeInstance.ClickAdminstration();
            homeInstance.ClickTimenMaterial();

            TimenMaterialPage tmPage = new TimenMaterialPage(driver);

            tmPage.ClickCreateNew();
            tmPage.EnterValidDataandSave(typecode, code, description, price);
            Assert.IsTrue("RecordFound" == tmPage.ValidateData(typecode, code, description, price), "Created record not found");
        }