how to get - Report.Screenshot : Object Identification and Technologies

how to get - Report.Screenshot

Technology specific object identification, supported applications, web technologies, and 3rd party controls.

how to get - Report.Screenshot

Postby omayer » Wed Feb 01, 2012 10:59 pm

I am trying to get screen shot if any window popup , using this code doesn't get the screen captured on report
- Report.Screenshot(repo.PopUp.Self);
Tipu
omayer
 
Posts: 240
Joined: Thu Oct 28, 2010 7:14 pm

Re: how to get - Report.Screenshot

Postby Support Team » Thu Feb 02, 2012 4:56 pm

Hi,

Could it be that the RxPath is wrong, because this method should work without any problems?
Do you get an error message, if yes can you send us the report file?
Can you send us the used RxPath and a Snapshot of such a popup window?

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

Re: how to get - Report.Screenshot

Postby omayer » Tue Feb 07, 2012 6:18 pm

can't get the screenshot on report
WindowForm.zip
(1.84 MiB) Downloaded 9 times


public void WindowsPopUp()
{

while (true)
{


if(repo.PopUp.SelfInfo.Exists())
{
Report.Failure("Window Popup");
Report.Screenshot();
Environment.Exit(-1);
}

}}
Tipu
omayer
 
Posts: 240
Joined: Thu Oct 28, 2010 7:14 pm

Re: how to get - Report.Screenshot

Postby Support Team » Tue Feb 07, 2012 10:16 pm

Could you also post the report/log file that is created, please?
Is there any screenshot in the report?
Have you tried swapping the Report.Failure and Report.Screenshot commands?

Report.Screenshot() without an element argument should create a screenshot of the whole desktop and add it to the report.

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

Re: how to get - Report.Screenshot

Postby omayer » Wed Feb 08, 2012 4:41 am

I tried all of these before post -swapping the Report.Failure and Report.Screenshot commands,Report.Screenshot() without an element argument ...report display as blank, whatever i try before this line of code "Environment.Exit(-1);"
gets ignored.
Tipu
omayer
 
Posts: 240
Joined: Thu Oct 28, 2010 7:14 pm

Re: how to get - Report.Screenshot

Postby Support Team » Wed Feb 08, 2012 4:36 pm

Hi,

Please answer the questions:
Could you also post the report/log file that is created, please?
Is there any screenshot in the report?

Can you also try to create a new solution which just adds such a screen shots to the report?
Does this properly work?

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

Re: how to get - Report.Screenshot

Postby omayer » Wed Feb 08, 2012 5:57 pm

ReportScreen.rxlog
logfile
(1.19 KiB) Downloaded 5 times
ReportScreenCaptur.jpg
snagIt
ReportScreenCaptur.jpg (40.22 KiB) Viewed 118 times
Tipu
omayer
 
Posts: 240
Joined: Thu Oct 28, 2010 7:14 pm

Re: how to get - Report.Screenshot

Postby omayer » Wed Feb 08, 2012 6:00 pm

yes it worked in a new solution that create usercode module---here is the code that worked on new solution-

public class MainEntry
{

public void screenCapture()
{

Report.Screenshot();
}



public MainEntry()
{
// Do not delete - a parameterless constructor is required!
}

[STAThread]

public static void Main(string[] args)
{

Report.SetupDefault();

Report.Screenshot();

}


}
}
Tipu
omayer
 
Posts: 240
Joined: Thu Oct 28, 2010 7:14 pm

Re: how to get - Report.Screenshot

Postby omayer » Wed Feb 08, 2012 6:05 pm

Ok here is the class that work as driver --
----

/*****Check for any popup, click OK and terminate the test*********/
Thread dialogWatchers = new Thread(rmaxValidation.WindowsPopUp);
dialogWatchers.IsBackground = true;
dialogWatchers.Start();

//* Enter Cmsn */////
tempCmsn.ClickNewSplit();

----------------------------
--------rmaxValidation.cs-----------------
public void WindowsPopUp()
{

while (true)
{

if(repo.Explorer_ScriptError.ButtonOKInfo.Exists())
{
Report.Failure("Window Popup");
Report.SetupDefault(); //with this line or w/out same result
Report.Screenshot();
Environment.Exit(-1);
}

}}
Tipu
omayer
 
Posts: 240
Joined: Thu Oct 28, 2010 7:14 pm

Re: how to get - Report.Screenshot

Postby omayer » Wed Feb 08, 2012 11:30 pm

finally its working by using the following code--

public void WindowsPopUp()
{

while (true)
{

if(repo.Explorer_ScriptError.ButtonOKInfo.Exists())
{

Report.Start();
Report.SetupDefault();
Report.Failure("Windows Popup");
Report.Screenshot();

Environment.Exit(-1);
} :D

}}
Tipu
omayer
 
Posts: 240
Joined: Thu Oct 28, 2010 7:14 pm

Re: how to get - Report.Screenshot

Postby omayer » Wed Feb 08, 2012 11:46 pm

ok the problem it works intermittent, now after couple of run now i am getting blank result
Tipu
omayer
 
Posts: 240
Joined: Thu Oct 28, 2010 7:14 pm

Re: how to get - Report.Screenshot

Postby Support Team » Tue Feb 14, 2012 1:53 pm

Hi,

We are sorry but we cannot reproduce the issue on one of our machines, can you therefore send us your project per mail or can you give us some more information about your test environment and used Ranorex version?

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

Re: how to get - Report.Screenshot

Postby artur_gadomski » Tue Mar 27, 2012 10:47 am

Isn't it a problem that Reporting from other threads doesn't work?
User avatar
artur_gadomski
 
Posts: 125
Joined: Mon Jul 19, 2010 7:55 am
Location: Copenhagen, Denmark

Re: how to get - Report.Screenshot

Postby Support Team » Wed Mar 28, 2012 11:12 am

Hi,

I already added it to our internal feature request list.
Please take a look at the following forum entry, it targets the same topic.

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


Return to Object Identification and Technologies

Who is online

Users browsing this forum: No registered users and 0 guests