예제 #1
0
        public void RegisterUser()
        {
            PropertyCollection.driver.Navigate().GoToUrl("http://executeautomation.com/demosite/index.html?UserName=&Password=&Login=Login");
            RegisterUserPageObject regUser = new RegisterUserPageObject();

            regUser.RegisterNewUser("Mr.", "Q", "Feroz", "Ally");
        }
예제 #2
0
        public void FillInPop()
        {
            PropertyCollection.driver.Navigate().GoToUrl("http://executeautomation.com/demosite/index.html?UserName=&Password=&Login=Login");

            string parentWindow = PropertyCollection.driver.CurrentWindowHandle;

            PopupPageObject popup = new PopupPageObject();

            popup.FillInPopUp("Mr.", "A", "B", "C", "D", "India");

            PropertyCollection.driver.SwitchTo().Window(parentWindow);

            RegisterUserPageObject regUser = new RegisterUserPageObject();

            regUser.RegisterNewUser("Mr.", "Q", "Feroz", "Ally");

            System.Threading.Thread.Sleep(2000);
        }
예제 #3
0
        public void AlertTest()
        {
            PropertyCollection.driver.Navigate().GoToUrl("http://executeautomation.com/demosite/index.html?UserName=&Password=&Login=Login");

            RegisterUserPageObject regAlert = new RegisterUserPageObject();

            regAlert.btnGenerate.Click();

            IAlert ia = PropertyCollection.driver.SwitchTo().Alert();

            ia.Accept();
            Assert.AreEqual("You pressed OK!", ia.Text);

            System.Threading.Thread.Sleep(3000);

            IAlert ia2 = PropertyCollection.driver.SwitchTo().Alert();

            ia2.Accept();

            System.Threading.Thread.Sleep(3000);
        }