private string BuildTextNotFoundExceptionText(string textToFind, BaseWebDriverTest ext) { StringBuilder sb = new StringBuilder(); string customLoggingMessage = String.Format("#### The text: {0} ####\n ####WAS NOT FOUND!####", textToFind); sb.AppendLine(customLoggingMessage); string cuurentUrlMessage = String.Format("The URL when the test failed was: {0}", ext.Browser.Url); sb.AppendLine(cuurentUrlMessage); return sb.ToString(); }
private string BuildNotCheckedExceptionText(By by, BaseWebDriverTest ext) { StringBuilder sb = new StringBuilder(); string customLoggingMessage = String.Format("#### The element with the location strategy: {0} ####\n ####WAS NOT CHECKED!####", by.ToString()); sb.AppendLine(customLoggingMessage); string cuurentUrlMessage = String.Format("The URL when the test failed was: {0}", ext.Browser.Url); sb.AppendLine(cuurentUrlMessage); return sb.ToString(); }
private string BuildTextNotFoundExceptionText(string textToFind, BaseWebDriverTest ext) { var stringBuilder = new StringBuilder(); string customLoggingMessage = string.Format("#### The text: {0} ####\n ####WAS NOT FOUND!####", textToFind); stringBuilder.AppendLine(customLoggingMessage); string cuurentUrlMessage = string.Format("The URL when the test failed was: {0}", ext.Browser.Url); stringBuilder.AppendLine(cuurentUrlMessage); return(stringBuilder.ToString()); }
private string BuildNotFoundElementExceptionText(By by, BaseWebDriverTest ext) { var stringBuilder = new StringBuilder(); string customLoggingMessage = string.Format("#### The element with the location strategy: {0} ####\n ####NOT FOUND!####", by.ToString()); stringBuilder.AppendLine(customLoggingMessage); string cuurentUrlMessage = string.Format("The URL when the test failed was: {0}", ext.Browser.Url); stringBuilder.AppendLine(cuurentUrlMessage); return(stringBuilder.ToString()); }
private string BuildElementStillVisibleExceptionText(By by, BaseWebDriverTest ext) { StringBuilder sb = new StringBuilder(); string customLoggingMessage = String.Format("#### The element with the location strategy: {0} ####\n ####IS STILL VISIBLE!####", by.ToString()); sb.AppendLine(customLoggingMessage); string cuurentUrlMessage = String.Format("The URL when the test failed was: {0}", ext.Browser.Url); sb.AppendLine(cuurentUrlMessage); return sb.ToString(); }
private string BuildElementStillVisibleExceptionText(By by, BaseWebDriverTest ext) { var sb = new StringBuilder(); string customLoggingMessage = string.Format("#### The element with the location strategy: {0} ####\n ####IS STILL VISIBLE!####", by.ToString()); sb.AppendLine(customLoggingMessage); string cuurentUrlMessage = string.Format("The URL when the test failed was: {0}", ext.Browser.Url); sb.AppendLine(cuurentUrlMessage); return(sb.ToString()); }
private string BuildNotCheckedExceptionText(By by, BaseWebDriverTest ext) { StringBuilder sb = new StringBuilder(); string customLoggingMessage = String.Format("#### The element with the location strategy: {0} ####\n ####WAS NOT CHECKED!####", by.ToString()); sb.AppendLine(customLoggingMessage); string cuurentUrlMessage = String.Format("The URL when the test failed was: {0}", ext.Browser.Url); sb.AppendLine(cuurentUrlMessage); return(sb.ToString()); }
public NotCheckedException(By by, BaseWebDriverTest ext) { string message = this.BuildNotCheckedExceptionText(by, ext); throw new ApplicationException(message); }
public StillCheckedException(By by, BaseWebDriverTest ext, Exception ex) { string message = this.BuildStillCheckedExceptionText(by, ext); throw new ApplicationException(message, ex); }
public TextNotFoundException(string textToFind, BaseWebDriverTest ext) { string message = this.BuildTextNotFoundExceptionText(textToFind, ext); throw new ApplicationException(message); }
public ElementStillVisibleException(By by, BaseWebDriverTest ext) { string message = this.BuildElementStillVisibleExceptionText(by, ext); throw new ApplicationException(message); }
public NoSuchElementException(By by, BaseWebDriverTest ext) { string message = this.BuildNotFoundElementExceptionText(by, ext); throw new ApplicationException(message); }