public void TC_ValidateLoginUIElements() { Page_Login plogin = new Page_Login(); //Call verify login method List <string[]> result = plogin.VerifyLoginUIElements(); //applied soft assertion to check all ui element in a test case Assert.Multiple(() => { for (int i = 0; i < result.Count; i++) { bool textmatchresult = Convert.ToBoolean(result.ElementAt(i)[1]); string msg = result.ElementAt(i)[0]; Assert.IsTrue(textmatchresult, msg); } } ); }