Пример #1
0
        public void NewSale_WhenSubmitSale_SaleLogWillAddedToDiary()
        {
            CustomerPage lead = LoginAndCreateLead();

            lead.GoToNewSale().SelectCourseAndGoToPaymentPage().SelectPaymentAndCompleteSale();
            Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.Sale));
        }
Пример #2
0
        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);
        }
Пример #3
0
Файл: Form1.cs Проект: ColtW/UI
        // 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.");
            }
        }
Пример #4
0
        private void customer_page(object sender, RoutedEventArgs e)
        {
            CustomerPage win = new CustomerPage();

            win.Show();
            this.Close();
        }
Пример #5
0
        public void TransferCustomer()
        {
            CustomerPage lead = LoginAndCreateLead();

            lead.ClickOnTheMenuAndGoToTransferPage().TransferCustomer();
            Assert.IsTrue(lead.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.Transfer));
        }
Пример #6
0
        public void DeleteCustomer()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //Delete Customer
            custObj.DeleteCustomer(driver);
        }
Пример #7
0
        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));
        }
Пример #8
0
        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));
        }
Пример #9
0
        public void GivenIHaveSelectedCustomerPage()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //create new Customer
            custObj.AddCustomer(driver);
        }
Пример #10
0
        public void ThenIShoudBeAbleToAddNewCustomerWithValidData()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //create new Customer
            custObj.AddCustomer(driver);
        }
Пример #11
0
        public void ThenIShouldBeAbleToEditCustomerWithValidData()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //Edit Customer
            custObj.EditCustomer(driver);
        }
Пример #12
0
        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);
        }
Пример #13
0
        public void ThenIShouldBeAbleToDeleteCustomer()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //Delete Customer
            custObj.DeleteCustomer(driver);
        }
Пример #14
0
        public void EditCustomer()
        {
            //object for customer page
            CustomerPage custObj = new CustomerPage();

            //Edit Customer
            custObj.EditCustomer(driver);
        }
Пример #15
0
        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));
        }
Пример #16
0
        public void LogCheck()
        {
            CustomerPage pt = LoginAndCreateLead();

            pt.ClickOnTheMenuAndGoToPlacementTest()
            .ClickOnPTButton()
            .ClickOnAllocate();
            Assert.IsTrue(pt.AllLogs.Any <DiaryLog>(a => a.LogType == CustomerPage.DiaryLogType.PlacementTestAllocated));
        }
Пример #17
0
        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));
        }
Пример #18
0
        public void NavigateToLandingPage()
        {
            LandingPage lp = new LandingPage(driver);

            FunctionLibrary.Screenshot("LandingPageScreenshot1");
            CustomerPage cp = lp.ClickOnCustomerServiceLink();

            FunctionLibrary.Screenshot("CustomerPageScreenshot");
            FunctionLibrary.ReadExcelData();
        }
Пример #19
0
        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);
        }
Пример #20
0
        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);
        }
Пример #21
0
        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"));
        }
Пример #22
0
        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);
        }
Пример #23
0
        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));
        }
Пример #24
0
        public void Place_ord(object sender, RoutedEventArgs e)
        {
            CustomerPage customerpage = new CustomerPage();

            this.NavigationService.Navigate(customerpage);
        }
Пример #25
0
 public ObjectForScriptingHelper(CustomerPage w)
 {
     this.mExternalWPF = w;
 }
Пример #26
0
        public void NavigateToCstomerPage()
        {
            CustomerPage custObj = new CustomerPage();

            custObj.NavigateToCustomerPage(driver);
        }
Пример #27
0
        public void CreateCustomerTest()
        {
            CustomerPage custObj = new CustomerPage();

            custObj.CreateCustomer(driver);
        }
Пример #28
0
        //Edit
        public void EditCustomerTest()
        {
            CustomerPage custObj = new CustomerPage();

            custObj.EditCustomer(driver);
        }
Пример #29
0
        //Delete
        public void DeleteCustomerTest()
        {
            CustomerPage custObj = new CustomerPage();

            custObj.DeleteCustomer(driver);
        }
Пример #30
0
        public App()
        {
            InitializeComponent();

            MainPage = new CustomerPage();
        }