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"); }
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); }
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); }