Beispiel #1
0
        /// <summary>
        /// Put Failed result with error messages for: AssemblyNotinitialized,CantResolveClassType, MissingClassType, CantResolveInerface;
        /// </summary>
        /// <param name="className"></param>
        /// <param name="errorType"></param>
        public void RecordCantFindErrors(string className, string errorType)
        {
            string errormessage = "don't have template for this error mesage";

            switch (errorType)
            {
            case "AssemblyNotinitialized":
                errormessage = "Missing delegate. Page object assembly is missing";
                break;

            case "MissingClassType":
                errormessage = "Missing delegate. Missing ClassType: " + className;
                break;

            case "CantResolveClassType":
                errormessage = "Missing delegate. Can't resolve ClassType: " + className;
                break;

            case "CantResolveInerface":
                errormessage = "Missing delegate. Can't resolve interface: " + className;
                break;

            default:
                break;
            }
            reportsLibrary.WriteErrorMessageWithScreenshot(reportTypes, "fatal", errormessage);
            Assert.Fail();
        }
 public void MissingElement(string fullElementName, string exseptionMessage, string fatalORFailed = "Fatal")
 {
     reportsLibrary.WriteErrorMessageWithScreenshot(reportTypes, fatalORFailed.ToLower(), "Element " + fullElementName + " is missing. <br><b>ErrorMessage: </b><br>" + exseptionMessage);
 }