Forum Discussion
jsc
14 years agoRegular Contributor
I changed the code:
function GeneralEvents_OnLogError(Sender, LogParams)
{
var MyIssue = ProjectSuite.Variables.issueID;
if (MyIssue == -1)
{
LogParams.Str = "New bug: the region checkpoint failed.";
}
else
{
LogParams.Str = "Known bug (issueID = " + MyIssue + "): the region checkpoint failed.";
Log.Warning(LogParams.Str);
LogParams.Locked = true;
}
ProjectSuite.Variables.issueID = "-1";
}
Like this I get an error "New bug..." when a new bug appears and a warning "known bug..." when a known bug appears.
With this code there are no pictures attached to this warning.
1) How can I
attach the pictures to my warning, that normally would be shown with
the error of the checkpoint?
2) How can I access the name of the checkpoint, respectively the name of the expected picture?
(those parameters should be known within this method as they are part of the regular output)
Only drawback of this solution is, that when I doubleclick on the warning-line in the results-tab I will be redirected to my script instead of the corresponding checkpoint within the test. But that's ok...
function GeneralEvents_OnLogError(Sender, LogParams)
{
var MyIssue = ProjectSuite.Variables.issueID;
if (MyIssue == -1)
{
LogParams.Str = "New bug: the region checkpoint failed.";
}
else
{
LogParams.Str = "Known bug (issueID = " + MyIssue + "): the region checkpoint failed.";
Log.Warning(LogParams.Str);
LogParams.Locked = true;
}
ProjectSuite.Variables.issueID = "-1";
}
Like this I get an error "New bug..." when a new bug appears and a warning "known bug..." when a known bug appears.
With this code there are no pictures attached to this warning.
1) How can I
attach the pictures to my warning, that normally would be shown with
the error of the checkpoint?
2) How can I access the name of the checkpoint, respectively the name of the expected picture?
(those parameters should be known within this method as they are part of the regular output)
Only drawback of this solution is, that when I doubleclick on the warning-line in the results-tab I will be redirected to my script instead of the corresponding checkpoint within the test. But that's ok...