コード例 #1
0
        public void spring2_TC315()
        {
            try
            {
                //Declare requried Variable
                string res, errormsg,productName;

                //Retriving Data from Excel
                string serialNo = TestContext.DataRow["serialNo"].ToString();

                //create object for environment
                window = BrowserWindow.Locate("FDAdminDashBoard");
                window.CloseOnPlaybackCleanup = false;

                //create object for page
                w = new WorkOrderPage(window);

                //Call nav_createWorkorder function
                res = w.nav_createWorkorder(window);

                //Call nav_createWorkorder function
                w.AddItem(serialNo);

                //Call nav_createWorkorder function
                productName = w.verifyProductName();

                //Validation
                Assert.AreEqual(productName, "");

                //Call nav_createWorkorder function
                errormsg = w.verifyErrorMsg();

                //Validation
                Assert.AreEqual(errormsg, "Required");
            }
            finally
            {
                //post Condtion
                w.nav_Home();
            }
        }
コード例 #2
0
        public void spring1_TC311()
        {
            try
             {
                 //Declare requried Variable
                 string res, errormsg;

                 //create object for environment
                 window = BrowserWindow.Locate("FDAdminDashBoard");
                 window.CloseOnPlaybackCleanup = false;

                 //create object for page
                 w = new WorkOrderPage(window);

                 //Call nav_createWorkorder function
                 res = w.nav_createWorkorder(window);

                 //Validation
                 Assert.AreEqual(res, "New Work Orders");

                 //Call Click_create funtion
                 w.Click_create();

                 //Call verifyErrorMsg function
                 errormsg = w.verifyErrorMsg();

                 //Validation
                 Assert.AreEqual(errormsg, "Required");
             }
             finally
             {
                 //post Condtion
                 w.nav_Home();
             }
        }