예제 #1
0
        public void LinkNewUnit()
        {
            string oldunitid = gblunitdeferralid;

            OnsiteHelper.generateunitid();
            Waits.WaitForElementToBeInvisible(By.Id("loading-dialog"), Core.WaitType.Small);
            Actions.Click(scanunitid);
            CommonActions.SetText(scanunitid, "=" + gblunitdeferralid + "00");
            Waits.WaitForElementToBeInvisible(By.Id("loading-dialog"), Core.WaitType.Small);
            Actions.Click(btnlink);
            Verify.ElementContainsText(txtmessage, "The current Unit ID " + oldunitid + " will be voided.The new Unit ID " + gblunitdeferralid + " will be linked.");

            Report.LogPassedTest("Unit ID voided");
            Report.TakeScreenshot();

            Actions.Click(btnyes);
            Waits.WaitForElementToBeInvisible(By.Id("loading-dialog"), Core.WaitType.Small);
        }
예제 #2
0
        public void LinkUnit()
        {
            OnsiteHelper.generateunitid();
            Waits.WaitForElementToBeInvisible(By.Id("loading-dialog"), Core.WaitType.Small);
            Actions.Click(scanunitid);
            CommonActions.SetText(scanunitid, "=" + gblunitdeferralid + "00");
            Waits.WaitForElementToBeInvisible(By.Id("loading-dialog"), Core.WaitType.Small);
            Actions.Click(btnlink);
            Verify.ElementContainsText(txtmessage, "Are you sure this is the right Unit ID to link ?");
            Report.LogPassedTest("Unit ID entered");
            Report.TakeScreenshot();

            Actions.Click(btnyes);
            Waits.WaitForElementToBeInvisible(By.Id("loading-dialog"), Core.WaitType.Small);
            OnsiteHelper.Loginpopup();
            Waits.WaitForElementToBeInvisible(By.Id("loading-dialog"), Core.WaitType.Small);

            Verify.ElementContainsText(txtmessage, "Msg: 21004: Unit has been linked successfully with the donor");
            Report.LogPassedTest("Unit ID is saved");
            Report.TakeScreenshot();
            Actions.Click(btnok);
            Waits.WaitForElementToBeInvisible(By.Id("loading-dialog"), Core.WaitType.Small);
        }