screenshot goes blank when error thrown

Ask general questions here.
rsudhak
Posts: 118
Joined: Fri Jan 04, 2019 1:38 pm

screenshot goes blank when error thrown

Post by rsudhak » Wed Mar 27, 2019 3:46 pm

Hi ,

When I run my test, randomly I get the message
Failed to find item 'DesignerSuiteAutomatedTestingRepository.ProDesign2016.Popup_Earthing.Container_Cables_SizeAndRating'.
No element found for path '/form[@classname='Popup']/container' within 12.6s (timeout factor = 0.21).

Tried catching the error and retrying the steps, but no use....
try{
ProDesign.PopupEarthing.Container_Cables_SizeAndRating.EnsureVisible();
}
catch(ElementNotFoundException e) {
if(!ProDesign.PopupEarthing.Container_Cables_SizeAndRatingInfo.Exists())
combo.Click();
Delay.Milliseconds(10000);
ProDesign.PopupEarthing.Container_Cables_SizeAndRating.EnsureVisible();
}
Container popup = ProDesign.PopupEarthing.Container_Cables_SizeAndRating;

Also, the screenshot shows a blank screen after that for the rest of the rows

Screenshot attached
You do not have the required permissions to view the files attached to this post.

User avatar
N612
Posts: 135
Joined: Mon Jul 11, 2016 4:01 pm

Re: screenshot goes blank when error thrown

Post by N612 » Wed Mar 27, 2019 9:02 pm

A blank screenshot usually means the user session is locked. If you are connecting this machine remotely via RDP, the user session is locked when you minimize/close the RDP session. If this is the case, check out this page to find how to work around this RDP issue: https://www.ranorex.com/help/latest/int ... e-desktop/.

If you are using a CI tool such as Jenkins to kick off your test, ensure it is running as a console application and not as a Windows service. Window services will not show any graphical interfaces and can lead to failed tests and blank screenshots. This link can further assist you with this if needed (see 'Infrastructure'): https://www.ranorex.com/blog/integratin ... n-process/.

If neither of the above items helps, what happens when you try taking a system screenshot or snapshot (Report.Screenshot(); / Report.Snapshot("/");) directly before this failure? Do you still receive a blank screenshot? Perhaps the video recording feature added in 9.0 can help us understand what may be occurring: https://www.ranorex.com/help/latest/ran ... oreporting

Hope this helps!