예제 #1
0
        public void validLogin()
        {
            LoginPageObject loginpage = new LoginPageObject();

            loginpage.login("*****@*****.**", "admin", "Agent");
            System.Threading.Thread.Sleep(3000);
            Assert.IsTrue(PropertiesCollection.Validateurl("http://localhost:4200/#/dashboard"));
            Console.WriteLine("Valid Login testcase passed");
            PropertiesCollection.Driver.Quit();
        }
예제 #2
0
        public void invalidlogin()
        {
            LoginPageObject loginpage = new LoginPageObject();

            loginpage.login("ad", "admin", "Agent");
            System.Threading.Thread.Sleep(2000);
            Assert.IsTrue(PropertiesCollection.Validatemessage("NOT AUTHORIZED", "#toast-container > div > div.toast-title.ng-star-inserted"));
            Console.WriteLine("Invalid Login testcase passed");
            PropertiesCollection.Driver.Quit();
        }
        public void NewRequest()
        {
            LoginPageObject loginpage = new LoginPageObject();

            loginpage.login("*****@*****.**", "admin", "Agent");
            System.Threading.Thread.Sleep(3000);
            PropertiesCollection.Driver.Navigate().GoToUrl("http://*****:*****@gmail.com");
            SR.DropDown(SR.RAssignedTodrpdown);
            //SAVE
            SR.Savebtn.Click();
            System.Threading.Thread.Sleep(5000);
            Assert.IsTrue(PropertiesCollection.Validateurl("http://localhost:4200/#/service/newservicerequestlist"));
            PropertiesCollection.Driver.Quit();
        }
        public void SideNav()
        {
            LoginPageObject     login = new LoginPageObject();
            DashboardPageObject dp    = login.login("*****@*****.**", "admin", "Agent");

            System.Threading.Thread.Sleep(3000);
            dp.NewSR.Click();
            System.Threading.Thread.Sleep(3000);
            Assert.IsTrue(PropertiesCollection.Validateurl("http://localhost:4200/#/service/create"));
            dp.SR.Click();
            System.Threading.Thread.Sleep(3000);
            Assert.IsTrue(PropertiesCollection.Validateurl("http://localhost:4200/#/service/newservicerequestlist"));
            dp.Equipments.Click();
            System.Threading.Thread.Sleep(3000);
            Assert.IsTrue(PropertiesCollection.Validateurl("http://localhost:4200/#/customers/all/equipment"));
            dp.Locations.Click();
            System.Threading.Thread.Sleep(3000);
            Assert.IsTrue(PropertiesCollection.Validateurl("http://localhost:4200/#/locations"));
            PropertiesCollection.Driver.Quit();
        }