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
Report.Screenshot
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Report.Screenshot
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:
Alex
Ranorex Support Team
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