Пример #1
0
        public void verifyError_count(string username, string OrganizationId)
        {
            int    registeredAsset_Count = 0;
            int    registeredAssetCount  = RegisteredAssetcount(username, OrganizationId);
            string countmsg          = EleErrorCount.GetText();
            IList <IWebElement> rows = HtmlTable_DCN.FindElements(By.TagName("tr"));
            int RowCnt = rows.Count;

            registeredAsset_Count = RowCnt - registeredAssetCount - 1;  //Subtract by 1 as header is also counted as 1 row
            Assert.AreEqual(true, countmsg.Contains(registeredAsset_Count.ToString()), "Count Matches for unregistered asset");
        }
Пример #2
0
        public void verify_ErrorCount_message()
        {
            int    i        = 0;
            string c        = "4";
            string countmsg = EleErrorCount.GetText();

            Assert.AreEqual(true, countmsg.Contains(c), "Count Matches");
            Actions actions = new Actions(BrowserFactory.Driver);

            actions.MoveToElement(EleErrorCount).Build().Perform();
            string[] ArrErrorsmg = new string[2];

            foreach (var msg in TxtErrorMsg)
            {
                ArrErrorsmg[i] = msg.GetText();
                i++;
            }
            Assert.AreEqual(true, ArrErrorsmg[1] == "Red = Mandatory Field : Data Missing", "Error Message verified successfully");
            Assert.AreEqual(true, ArrErrorsmg[2] == "Green = Mandatory Field : Data Associated", "Error Message verified successfully");
        }