コード例 #1
0
        public void CreateNewRoute()
        {
            //Delete the test route if it exists
            DeleteRouteIfExists("Test");
            AddNewRoute.Click();
            driver.WaitUntilElementIsPresent(By.ClassName("ui-dialog-title")); //Wait until the dialog opens
            //Begin filling out the new route form
            NewRouteNumber.EnterText("Test", "NewRouteNumber");

            //The following will select a location
            NewRouteLocation.SelectByIndex(1, "NewRouteLocation");
            //The following will select a clasification
            NewRouteClassification.SelectByText("Drive Only", "NewRouteClassification");
            //The following will select a Default Driver
            NewRouteDefaultDriver.SelectByIndex(1, "NewRouteDefaultDriver");
            //The following will select a Driver Pay Scale
            NewRouteDriverPayScale.SelectByText("T", "NewRouteDriverPayScale");
            NewRouteDriverHelperPayScale.SelectByText("T", "NewRouteDriverHelperPayScale");

            //The following will select a Depart Day
            NewRouteDepartDay.SelectByIndex(1, "NewRouteDepartDay");
            NewRouteMiles.EnterText("275", "NewRouteMiles");
            NewRouteZipCode.EnterText("43212", "NewRouteZipCode");
            NewRouteDepartTime.EnterText("05:00", "NewRouteDepartTime");
            NewRouteDuration.EnterText("5", "NewRouteDuration");
            //Save this new route
            NewRouteOkButton.Click();
            //Need to manually wait for the alert to popup
            Thread.Sleep(2000);
        }
コード例 #2
0
        private void addNewRouteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddNewRoute anr = new AddNewRoute();

            anr.MdiParent     = this;
            anr.StartPosition = FormStartPosition.CenterScreen;
            anr.Show();
        }