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

Verifying font attributes and hyperlinks in RichTextEditor

6 Answers 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Radhika
Top achievements
Rank 1
Radhika asked on 28 Nov 2012, 02:39 PM

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);

 

6 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 03 Dec 2012, 10:51 AM
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
0
Radhika
Top achievements
Rank 1
answered on 03 Dec 2012, 01:14 PM

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
0
Radhika
Top achievements
Rank 1
answered on 03 Dec 2012, 02:12 PM

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
0
Stoich
Telerik team
answered on 06 Dec 2012, 12:44 PM
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
0
Radhika
Top achievements
Rank 1
answered on 06 Dec 2012, 02:04 PM

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

 

0
Stoich
Telerik team
answered on 10 Dec 2012, 01:42 PM
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
Tags
General Discussions
Asked by
Radhika
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Radhika
Top achievements
Rank 1
Share this question
or