how to use Custom Annotations

10 posts, 1 answers
  1. Humberto
    Humberto avatar
    8 posts
    Member since:
    Mar 2012

    Posted 16 Aug 2013 Link to this post

    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
  2. Mario
    Admin
    Mario avatar
    8 posts

    Posted 21 Aug 2013 Link to this post

    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
  3. Humberto
    Humberto avatar
    8 posts
    Member since:
    Mar 2012

    Posted 22 Aug 2013 Link to this post

    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
  4. Mario
    Admin
    Mario avatar
    8 posts

    Posted 27 Aug 2013 Link to this post

    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
  5. Humberto
    Humberto avatar
    8 posts
    Member since:
    Mar 2012

    Posted 03 Sep 2013 Link to this post

    Mario, I've not heard back from you. Any progress/updates on the "proper" usage of this Annotator class and methods?
  6. Humberto
    Humberto avatar
    8 posts
    Member since:
    Mar 2012

    Posted 03 Sep 2013 Link to this post

    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
  7. Answer
    Mario
    Admin
    Mario avatar
    8 posts

    Posted 05 Sep 2013 Link to this post

    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
  8. Humberto
    Humberto avatar
    8 posts
    Member since:
    Mar 2012

    Posted 06 Sep 2013 Link to this post

    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.
  9. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 11 Sep 2013 Link to this post

    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
  10. Humberto
    Humberto avatar
    8 posts
    Member since:
    Mar 2012

    Posted 12 Sep 2013 Link to this post

    I understand.

    Thank you.
Back to Top