Verifying font attributes and hyperlinks in RichTextEditor

7 posts, 0 answers
  1. Radhika
    Radhika avatar
    12 posts
    Member since:
    Feb 2011

    Posted 28 Nov 2012 Link to this post


    I am trying to verify all front attributes of the textblockcontent in RichText Editor. I tried the below code but it always gives "Normal" regardless. I want to be able to extract the TextBlockContent and verify the font attibutes or if it is hyperlink? Has anyone done this before...Any help is appreciated!


     

     

    string rtbTextFontStyle = Pages.QAAUTOSYNC1228183918.SilverlightApp.RichTextEditorTemplateRichtextbox.FontStyle.ToString();

     

    Log.WriteLine(

     

    "Font Style is " + rtbTextFontStyle);

     

  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 03 Dec 2012 Link to this post

    Hi Radhika,
    why have you chosen to do this in code? You can use Test Studio's GUI to record verifications against the RichTextEditor's elements:
    http://screencast.com/t/DtvJQegKFG4

    Check out all the options that will give you. Perhaps you will not need to resort to code. I hope this helps - let me know if that doesn't do the trick and you require additional assistance.  

    Kind regards,
    Stoich
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Radhika
    Radhika avatar
    12 posts
    Member since:
    Feb 2011

    Posted 03 Dec 2012 Link to this post


    Thanks for the response!

    So doesn this mean every word in rich text editor is a textblock and i need to verify every text like the way you suggested? Also in DOM i could not see the textblock content. Is that hidden?

    Thanks
    Radhika
  4. Radhika
    Radhika avatar
    12 posts
    Member since:
    Feb 2011

    Posted 03 Dec 2012 Link to this post


    I have attached the screenshots of the rich text ediotr i am trying to verify. I am unable to hover and select a specifc text like you did in your code. When i hover the entire Rich text editor is selected that i have shown in the scrrenshot attached. Thanks
    Radhika
  5. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 06 Dec 2012 Link to this post

    Hi Radhika,
    is this control a Telerik radcontrol like the one seen in this demo:
    http://demos.telerik.com/silverlight/#RichTextBox/MSWord
    ?

    Each word in the RadRichTextEditor should be a separate textbox. I've confirmed this behavior not only with our own Telerik RadRichTextbox control but also controls manufactured from other companies.

    If your control is not a Telerik control - can you find a demo pages that has this type of control somewhere online. We will use the demo to examine the control and determine how to test it.

    Hope to hear from you soon.

    Regards,
    Stoich
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  6. Radhika
    Radhika avatar
    12 posts
    Member since:
    Feb 2011

    Posted 06 Dec 2012 Link to this post


    The control that we are using is ...

    The namespace

    xmlns

     

     

    :liquid="clr-namespace:Liquid;assembly=RichTextNoteEditor.RichTextEditor"

     


    and the control is

     

     

     

    <liquid:RichTextBox x:Name="richTextEditorTemplate"

     

     

     

     

    </liquid:RichTextBox>

    Have you tried with this control?

    Thanks
    Radhika

     

  7. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 10 Dec 2012 Link to this post

    Hi Radhika,
    it will not be possible to use the XAML description of the RichTextBox in order to reproduce the problem. In order to try and reproduce the problem we need a functioning demo such as this one:
    http://demos.telerik.com/silverlight/#RichTextBox/TelerikEditor

    Or you can send us your actual Silverlight project so we can host the RichTextEditor in our environment. If you would like to send us the project let us know so that we can arrange a confidential way for you to send it to us.

    Hope to hear from you soon.

    All the best,
    Stoich
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top