Report.Screenshot : Bug Reports

Report.Screenshot

Bug reports and feature requests.

Report.Screenshot

Postby atom » Tue Oct 13, 2009 4:53 pm

Hiya

The Report.Screenshot method doesnt seem to make sure the item your taking a screen shot of is
Activated. I take screen shots of all error dialogs found during the test, and often the dialog is not
activated before the screen shot and so is only partially visible.

Thanks
atom
 
Posts: 321
Joined: Mon Dec 08, 2008 12:14 am
Location: Dublin, Ireland

Re: Report.Screenshot

Postby Support Team » Wed Oct 14, 2009 11:50 am

You are right, Report.Screenshot does not call EnsureVisible on the element. This behavior is by design, because we don't want to influence the application by doing the screenshot. That way you can identify, for example, that not finding an element is caused by the fact that a dialog was not activated.

You can, however, use the following code for screenshots that will make sure that the element is visible:
// make screenshot of Element target and make sure the element is visible
Image screenShot = Imaging.CaptureImage(target);
Report.LogData(ReportLevel.Info, "ScreenShot", screenShot);

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4285
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests