6.1.0: How to use PopupWatcher.EnableReportMessages?

Class library usage, coding and language questions.
BCTest
Posts: 88
Joined: Tue Jun 03, 2014 10:15 am
Location: Hamburg, Germany

6.1.0: How to use PopupWatcher.EnableReportMessages?

Post by BCTest » Wed Sep 21, 2016 9:10 am

Hello,

as in PopupWatcher.EnableReportMessages described I thought I turned off PopupWatcher-Messages by setting

Code: Select all

EnableReportMessages = false
Sample:
private PopupWatcher ProfiDialogUeberwacher = new PopupWatcher();
...
ProfiDialogUeberwacher.EnableReportMessages = false;
ProfiDialogUeberwacher.WatchAndClick(repo.InternetExplorerSchliessenFrage.SelfInfo, repo.InternetExplorerSchliessenFrage.AlleRegisterkartenSchliessenInfo);
ProfiDialogUeberwacher.Start();
But there are still warnings in the report:
2016-09-21 08_14_49-Mozilla Firefox.png
Report output
2016-09-21 08_14_49-Mozilla Firefox.png (3.28 KiB) Viewed 709 times
How to use PopupWatcher.EnableReportMessages correct?

And why are the PopupWatcher-Messages Warnings? I expected in a case that an unexpected Dialog was not shown during test-execution only an information would be reported, not a warning.

Regards,
Thomas

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: 6.1.0: How to use PopupWatcher.EnableReportMessages?

Post by krstcs » Wed Sep 21, 2016 2:03 pm

Warnings are basically just a higher level of INFO with color added in the report. They don't stop the test, they don't cause failures, and they aren't counted against the Success/Failure count.

If you don't want a Warning, you can add your own Report.Info line to the PopupWatcher's handler, but you would need to use the Watch() method instead of the WatchAndClick().
Shortcuts usually aren't...

BCTest
Posts: 88
Joined: Tue Jun 03, 2014 10:15 am
Location: Hamburg, Germany

Re: 6.1.0: How to use PopupWatcher.EnableReportMessages?

Post by BCTest » Wed Sep 21, 2016 2:54 pm

Thanks krstcs for the answer.

I agree: warnings are no failures. But we have created a dashboard scanning all test-reports for successes, failures and warnings. So our dashboard went yellow because a PopupWatcher-Warning was in the report.

We will handle this (either in Ronorex or in our scanner) but why was this message shown at all? Shouldn't it be supressed? Or was our code not proper?

Regards,
Thomas

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: 6.1.0: How to use PopupWatcher.EnableReportMessages?

Post by krstcs » Wed Sep 21, 2016 3:16 pm

Ah, I missed that part of your original post.

Yes, you are using it correctly. I don't understand why it would be doing that either. Mine works fine like that.
Shortcuts usually aren't...