This is a migrated thread and some comments may be shown as answers.

how to use Custom Annotations

9 Answers 94 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Humberto
Top achievements
Rank 1
Humberto asked on 16 Aug 2013, 09:16 PM
Hello,

How does one use the AnnotationMode.CustomOnly feature.  I am talking about using the WebAii framework and not via Test Studio.

I understand that you have to use the Settings class properties .AnnotateExecution and AnnotationMode.  But then how does one decorate one's methods and actions so that the annotations get displayed during execution? This is all I have so far but then...?

Manager.Settings.AnnotateExecution = true;
Manager.Settings.AnnotationMode = AnnotationMode.CustomOnly;

-Humbi

9 Answers, 1 is accepted

Sort by
0
Mario
Telerik team
answered on 21 Aug 2013, 07:54 PM
Hello Humbi,

Thank you for contacting Telerik Support.

If you have not already, please take a look at our documentation regarding the annotator when writing tests in code. At the bottom of this page under the section 'Performing Your Own Annotation' are some examples I believe will be useful to you.

Let me know whether you have any additional questions.

Regards,
Mario
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Humberto
Top achievements
Rank 1
answered on 22 Aug 2013, 10:59 PM
Hi Mario,

No, I had not looked at the online documentation.  I'm not sure when that particular section was added but in the past when I was looking at the documentation, I don't remember ever seeing that.  Thank you for pointing it out to me.

The documentation does help, yes, but not very much.  I am able to use custom annotations now and it works but it seems a bit cumbersome to use.

I now have something like this:


 Manager.Settings.AnnotateExecution = true;
 Manager.Settings.AnnotationMode = AnnotationMode.CustomOnly;
 Annotator myAnnotator = new Annotator(ActiveBrowser);
 myAnnotator.Settings.CustomDisplayTime = 300;
//more code here//
myAnnotator.Annotate(Pages.Login.UserNameEntryField.GetRectangle(), "Authenticating...");

I notice though that when I use that particular overload of the Annotate method...the red highlight box stays around long after the control(the entry field) has disappeared and I've (the GUI script) gone to another page.

Even if I comment out and not use the CustomDisplayTime property the red highlight box lingers long after...

The Annotation message (in this case "Authenticating...") does disappear from view but not the highlight box.

I am interested in tying the annotation to the specific UI control that the mouse and/or keyboard is acting on.

Does this mean that everytime I use the Annotator.Annotate method, I have to also call the Annotator.Clear method as well to get rid of the annotation?  It's not smart enough to know that, now that the UI element it's acting on is gone...it (the annotation) should also be gone as well?

Thank you,
-Humberto
0
Mario
Telerik team
answered on 27 Aug 2013, 10:41 PM
Hello Humberto,

I'm glad the documentation helped, even if only to get you started.

Currently the annotator will leave the red highlight box behind until you either call for another annotation or use the Clear method, where CustomDisplayTime sets the amount of time that the script is essentially paused for the viewer to see/read the message.

As for your question, I will need to get a hold of one of our developers to confirm, however I do believe that the only way to get rid of the currently displayed annotation is to, as mentioned above, either call for another annotation or use the Clear method. I'll get back to you again once I confirm.

Regards,
Mario
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Humberto
Top achievements
Rank 1
answered on 03 Sep 2013, 02:46 PM
Mario, I've not heard back from you. Any progress/updates on the "proper" usage of this Annotator class and methods?
0
Humberto
Top achievements
Rank 1
answered on 03 Sep 2013, 08:40 PM
Mario, I found a video on your website that is kind of useful for hand-coding steps:

http://www.telerik.com/automated-testing-tools/support/videos/visual-studio-plugin/webui-developer-edition-%E2%80%93-webaii-best-practices.aspx

but it plays back too small to be legible and there's no way to control playback.  You can only play it...and not walk away from the computer.

Is it available elsewhere/elsewise?

-Humberto
0
Accepted
Mario
Telerik team
answered on 05 Sep 2013, 11:48 PM
Hi Humberto,

My sincere apologies for the delay in getting back to you, we are currently experiencing a spike in our support volume.

After consulting with our dev team, they have confirmed that this is the currently expected/proper behavior for the annotator. Nonetheless, I tend to agree with you in that there is inconsistency between text vs rectangle annotations (where text disappears, rectangle stays) and wish to investigate further into whether this is actually the ideal way. I have created this entry in our public Feedback Portal for you to follow the progress of this issue.

As for the video, it may be available here (or one that is similar), however I will have to get back to you with regards to whether a higher quality version is available. 
 
Regards,
Mario
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Humberto
Top achievements
Rank 1
answered on 06 Sep 2013, 10:03 PM
Thank you Mario.

I eagerly anticipate a response from you and ideally a much better quality video, if possible. Yes I did find the very same video I am referencing and the quality is still poor.  Also, playback, pausing, fast forwarding, etc. are still no possible.  The narrator starts with explaining all of the Browser configurations necessary but I've already done all of that...yet I have no way of skipping over that material!

But the syntax itself in his VS IDE remains illegible.
0
Velin Koychev
Telerik team
answered on 11 Sep 2013, 09:01 PM
Hi Humberto,

Unfortunately we could not currently provide you with higher quality version of this video. The good news is that we consider to re-record this video again. This will also fix the issues that you experience with the navigation in the video.
 
Thank you for your understanding.

Regards,
Velin Koychev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Humberto
Top achievements
Rank 1
answered on 12 Sep 2013, 02:19 PM
I understand.

Thank you.
Tags
General Discussions
Asked by
Humberto
Top achievements
Rank 1
Answers by
Mario
Telerik team
Humberto
Top achievements
Rank 1
Velin Koychev
Telerik team
Share this question
or