how to get - Report.Screenshot
how to get - Report.Screenshot
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);
- Report.Screenshot(repo.PopUp.Self);
Tipu
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: how to get - Report.Screenshot
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
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
Re: how to get - Report.Screenshot
can't get the screenshot on report
public void WindowsPopUp()
{
while (true)
{
if(repo.PopUp.SelfInfo.Exists())
{
Report.Failure("Window Popup");
Report.Screenshot();
Environment.Exit(-1);
}
}}
public void WindowsPopUp()
{
while (true)
{
if(repo.PopUp.SelfInfo.Exists())
{
Report.Failure("Window Popup");
Report.Screenshot();
Environment.Exit(-1);
}
}}
You do not have the required permissions to view the files attached to this post.
Tipu
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: how to get - Report.Screenshot
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
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
Re: how to get - Report.Screenshot
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.
gets ignored.
Tipu
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: how to get - Report.Screenshot
Hi,
Please answer the questions:
Does this properly work?
Regards,
Markus
Ranorex Support Team
Please answer the questions:
Can you also try to create a new solution which just adds such a screen shots to the report?Could you also post the report/log file that is created, please?
Is there any screenshot in the report?
Does this properly work?
Regards,
Markus
Ranorex Support Team
Re: how to get - Report.Screenshot
You do not have the required permissions to view the files attached to this post.
Tipu
Re: how to get - Report.Screenshot
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();
}
}
}
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
Re: how to get - Report.Screenshot
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);
}
}}
----
/*****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
Re: how to get - Report.Screenshot
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);
}
}}
public void WindowsPopUp()
{
while (true)
{
if(repo.Explorer_ScriptError.ButtonOKInfo.Exists())
{
Report.Start();
Report.SetupDefault();
Report.Failure("Windows Popup");
Report.Screenshot();
Environment.Exit(-1);
}
}}
Tipu
Re: how to get - Report.Screenshot
ok the problem it works intermittent, now after couple of run now i am getting blank result
Tipu
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: how to get - Report.Screenshot
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
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
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: how to get - Report.Screenshot
Isn't it a problem that Reporting from other threads doesn't work?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: how to get - Report.Screenshot
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
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