Exemplo 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
        }
Exemplo 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
        }
Exemplo n.º 3
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");
        }