I have the following code:
public void Method1()
{
try
{
this.UIMap.abc(TestContext.DataRow["xxx"].ToString());
this.UIMap.xyz(TestContext.DataRow["zzz"].ToString());
}
catch (Exception ex)
{
Image pic = this.UIMap.UItestingWindow.CaptureImage();
pic.Save(@"C:\result.bmp");
TestContext.AddResultFile(@"C:\result.bmp");
}
How can I take an image of an Exception
with "No messageBox"?
If an error occurs, Method2()
should be called.