Forum Discussion
anik_cadieux
10 years agoContributor
Thanks Tanya, we cannot do that.
Sorry for the misunderstanding. I should have wrote: "We want to stop posting image on error for a specific part of the test".
What I did is the following:
- First, define a ProjectSuite.Variables.BoolPostImageOnError as a boolean, set to True by default.
Then:
function Main()
{
test1();
test2();
test3();
}
function test2()
{
ProjectSuite.Variables.BoolPostImageOnError = false;
for (i=0; i < 1000; i++)
{
CheckFileStatus(i);
}
ProjectSuite.Variables.BoolPostImageOnError = true;
}
function GeneralEvents_OnLogError(Sender, LogParams)
{
if (ProjectSuite.Variables.BoolPostImageOnError)
{
Log.Picture(Sys.Desktop.Picture(), "Screen shot of the next error message");
}
}
The problem with this workaround is that now every time I have an error, I get 2 lines in the log.
Sorry for the misunderstanding. I should have wrote: "We want to stop posting image on error for a specific part of the test".
What I did is the following:
- First, define a ProjectSuite.Variables.BoolPostImageOnError as a boolean, set to True by default.
Then:
function Main()
{
test1();
test2();
test3();
}
function test2()
{
ProjectSuite.Variables.BoolPostImageOnError = false;
for (i=0; i < 1000; i++)
{
CheckFileStatus(i);
}
ProjectSuite.Variables.BoolPostImageOnError = true;
}
function GeneralEvents_OnLogError(Sender, LogParams)
{
if (ProjectSuite.Variables.BoolPostImageOnError)
{
Log.Picture(Sys.Desktop.Picture(), "Screen shot of the next error message");
}
}
The problem with this workaround is that now every time I have an error, I get 2 lines in the log.
Related Content
- 4 years agoSuperTester
- 5 months agommaloney
- 3 years agoLRuoc