public void NewSale_WhenSubmitSale_SaleLogWillAddedToDiary() { CustomerPage lead = LoginAndCreateLead(); lead.GoToNewSale().SelectCourseAndGoToPaymentPage().SelectPaymentAndCompleteSale(); Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.Sale)); }
public void Setup() { //Runs once before every test //var driverService = PhantomJSDriverService.CreateDefaultService(); //driverService.HideCommandPromptWindow = true; //driverService.IgnoreSslErrors = true; //driver = new PhantomJSDriver(driverService); // DesiredCapabilities capability = DesiredCapabilities.Firefox(); // capability.SetCapability("platform", "WIN10"); // capability.SetCapability("version", "46"); //driver = new RemoteWebDriver( // new Uri("http://127.0.0.1:4444/wd/hub/"), capability, TimeSpan.FromSeconds(600)); driver = new ChromeDriver(); driver.Navigate().GoToUrl("https://auto-buy-gz-user1.geico.com/"); try { IWebElement overrideLink = driver.FindElement(By.Id("overridelink")); overrideLink.Click(); } catch (Exception) { } customer = new CustomerPage(driver); vehicle = new VehiclePage(driver); }
// when the login button is pushed it will search the database by username // then read the username and password for that record and move on if they match // the input or give an error if they do not match. private void btnLogin_Click(object sender, EventArgs e) { SqlConnection connection = new SqlConnection(); connection.ConnectionString = "Server=cis1.actx.edu;Database=project2;User Id=db2;Password = db20;"; connection.Open(); //login check using (SqlCommand findUsername = connection.CreateCommand()) { findUsername.CommandText = "select * from dbo.Customers where Username = '******'"; using (SqlDataReader reader = findUsername.ExecuteReader()) { while (reader.Read()) { user = reader.GetString(5); pass = reader.GetString(6); } } } if (user == textBox1.Text && pass == textBox2.Text) { TeamBWindowsFormCustomerPage.CustomerPage loginSuccess = new CustomerPage(); loginSuccess.Activate(); loginSuccess.Visible = true; this.Visible = false; } else { MessageBox.Show("Incorrect credentials, try again."); } }
private void customer_page(object sender, RoutedEventArgs e) { CustomerPage win = new CustomerPage(); win.Show(); this.Close(); }
public void TransferCustomer() { CustomerPage lead = LoginAndCreateLead(); lead.ClickOnTheMenuAndGoToTransferPage().TransferCustomer(); Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.Transfer)); }
public void DeleteCustomer() { //object for customer page CustomerPage custObj = new CustomerPage(); //Delete Customer custObj.DeleteCustomer(driver); }
public void CancelSale() { CustomerPage lead = LoginAndCreateLead(); lead.GoToNewSale().SelectCourseAndGoToPaymentPage().SelectPaymentAndCompleteSale(); lead.ClickOnCancelButtonAndGoToCancelSale().CancelSale(); Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.SaleCancelled)); }
public void ChangeSale() { CustomerPage lead = LoginAndCreateLead(); lead.GoToNewSale().SelectCourseAndGoToPaymentPage().SelectPaymentAndCompleteSale(); lead.ChangelSaleAndGoToSalePage().ChangeOptionAndSubmitSale(); Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.ChangeaSale)); }
public void GivenIHaveSelectedCustomerPage() { //object for customer page CustomerPage custObj = new CustomerPage(); //create new Customer custObj.AddCustomer(driver); }
public void ThenIShoudBeAbleToAddNewCustomerWithValidData() { //object for customer page CustomerPage custObj = new CustomerPage(); //create new Customer custObj.AddCustomer(driver); }
public void ThenIShouldBeAbleToEditCustomerWithValidData() { //object for customer page CustomerPage custObj = new CustomerPage(); //Edit Customer custObj.EditCustomer(driver); }
public void AlertAdded() { CustomerPage lead = LoginAndCreateLead(); lead.GoToAlertPage().AddAlert("test alert"); Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.AlertAdded)); Assert.AreEqual("test alert", lead.AllLogs.First <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.AlertAdded).ClickToSeeAlertSummary().AlertMessage); }
public void ThenIShouldBeAbleToDeleteCustomer() { //object for customer page CustomerPage custObj = new CustomerPage(); //Delete Customer custObj.DeleteCustomer(driver); }
public void EditCustomer() { //object for customer page CustomerPage custObj = new CustomerPage(); //Edit Customer custObj.EditCustomer(driver); }
public new void SetupMeeting() { CustomerPage lead = LoginAndCreateLead(); lead.SetupMeetingAndGoToCalendar().SetupMeeting(); Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.SetupMeeting)); Assert.IsTrue(lead.ActionLogs.Any <DiaryLog>(a => a.ActionLogType == CustomerPage.LeadLogActionType.PhoneSchedule)); }
public void LogCheck() { CustomerPage pt = LoginAndCreateLead(); pt.ClickOnTheMenuAndGoToPlacementTest() .ClickOnPTButton() .ClickOnAllocate(); Assert.IsTrue(pt.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.PlacementTestAllocated)); }
public void CancelMeeting() { CustomerPage lead = LoginAndCreateLead(); lead.SetupMeetingAndGoToCalendar().SetupMeeting(); lead.CancelMeetingClickAndGoToCancelMeetingPage(); Thread.Sleep(3000); Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.MeetingCanceled)); }
public void NavigateToLandingPage() { LandingPage lp = new LandingPage(driver); FunctionLibrary.Screenshot("LandingPageScreenshot1"); CustomerPage cp = lp.ClickOnCustomerServiceLink(); FunctionLibrary.Screenshot("CustomerPageScreenshot"); FunctionLibrary.ReadExcelData(); }
public void DeleteCustonerTest() { // page object for Home page HomePage homeObj = new HomePage(); homeObj.NavigateToCustomer(driver); // create object for CustomerPage CustomerPage custObj = new CustomerPage(); //Delete customer test custObj.DeleteCustomer(driver); }
public void AddNewCustomer() { //Create page object for HOME PAGE HomePage homeObj = new HomePage(); homeObj.NavigatetoCustomer(driver); //object for customer page CustomerPage custObj = new CustomerPage(); //create new Customer custObj.AddCustomer(driver); }
public ActionResult SaveRecord(CustomerPage proj) { project pro = new project(); pro.name = proj.project.name; pro.date = Convert.ToDateTime(proj.project.date); pro.descreption = proj.project.descreption; pro.price = proj.project.price; db.projects.Add(pro); db.SaveChanges(); return(RedirectToAction("Index")); }
public void DeleteCustomerTest() { //page object for HomePage HomePage homeobj = new HomePage(); //navigate to CustomerPage homeobj.NavigateToCustomer(driver); //Create page object for CustomerPage CustomerPage custobj = new CustomerPage(); //Create new Add Customer Test Case custobj.DeleteCustomer(driver); }
public ActionResult Index() { var custtomer = db.users.SingleOrDefault(x => x.email == "*****@*****.**"); var proj = db.projects.ToList(); var usrs = db.users.ToList(); CustomerPage cust = new CustomerPage { customer = custtomer, users = usrs, projects = proj }; return(View(cust)); }
public void Place_ord(object sender, RoutedEventArgs e) { CustomerPage customerpage = new CustomerPage(); this.NavigationService.Navigate(customerpage); }
public ObjectForScriptingHelper(CustomerPage w) { this.mExternalWPF = w; }
public void NavigateToCstomerPage() { CustomerPage custObj = new CustomerPage(); custObj.NavigateToCustomerPage(driver); }
public void CreateCustomerTest() { CustomerPage custObj = new CustomerPage(); custObj.CreateCustomer(driver); }
//Edit public void EditCustomerTest() { CustomerPage custObj = new CustomerPage(); custObj.EditCustomer(driver); }
//Delete public void DeleteCustomerTest() { CustomerPage custObj = new CustomerPage(); custObj.DeleteCustomer(driver); }
public App() { InitializeComponent(); MainPage = new CustomerPage(); }