RadRichTextBox automation

8 posts, 1 answers
  1. Mariko
    Mariko avatar
    39 posts
    Member since:
    Jun 2011

    Posted 08 Jul 2011 Link to this post

    Hi,

    Is Radrichtextbox control have UI automation support? I'm using the Coded Step and trying to find the control and gets this error
    "The type or namespace name 'RadRichTextBox' could not be found (are you missing a using directive or an assembly reference?)"

    How can i instantiate the radrichtextbox control? and try entering some text on it.

    Thanks.
  2. Answer
    Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 08 Jul 2011 Link to this post

    Hello Mariko,
        I discussed this with our developers. Currently with don't have a translator for this kind of control. Automating is somewhat difficult. It seem that the RadRichTextBox are represented by elements of type Caret in the DOM of the app. You type into the RadRichTextBox by typing its respective Caret element. I've put together a little sample to demonstrate this. The following code types into one of the RadRichTextBoxes found on this demo page:
    http://demos.telerik.com/silverlight/#RichTextBox/MSWord
    ActiveBrowser.NavigateTo("http://demos.telerik.com/silverlight/#RichTextBox/MSWord");
    this.Manager.Settings.EnableSilverlight = true;
    this.Manager.Settings.SilverlightConnectTimeout = 60000;
    SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
    app.Find.ByType("Caret").User.TypeText("This is some text I'm going to type!", 50);
    A different way to automate this is by using desktop typing/mouseclicks:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/test-execution-problems/invoke-blind-keyboard-typing.aspx
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/test-execution-problems/invoke-blind-mouse-click.aspx

    Currently a translator for RadRichTextBox is logged as feature request but I can't give you an ETA.

    Best wishes,
    Stoich
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
  3. Mariko
    Mariko avatar
    39 posts
    Member since:
    Jun 2011

    Posted 10 Jul 2011 Link to this post

    Hi Stoich,

    I've tried the code using the Test Studio and the Internet Explorer stops responding when executing the step. 

    In VS plugin it passes successfully but gets the error QTAgent32.exe has stopped working.

    Thanks.
  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 11 Jul 2011 Link to this post

    Hello Mariko,
         you state that you've tried the code. Did you try it against your own app or against the app from our demo page:
    http://demos.telerik.com/silverlight/#RichTextBox/MSWord
    ?

    Could you please send me your test, I'll check it out and I'll try to determine why it's not working.
    However, if the test runs against an app that's not publicly accessible (i.e. I won't be able to run the test) it will be very difficult to perform troubleshooting.

    If you feel this data is too sensitive to share on a public thread please go ahead and open a new support ticket. As a paying customer you're entitled to use our support system.

    Regards,
    Stoich
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
  5. Mariko
    Mariko avatar
    39 posts
    Member since:
    Jun 2011

    Posted 11 Jul 2011 Link to this post

    Hi Stoich,

    I'm currently testing your demo page. Attached is the test that I'm using.

    Thanks
  6. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 11 Jul 2011 Link to this post

    Hi Mariko,
        run the test as part of a TestList and make sure you've set the "Enable Silverlight" setting to true. Check out this video:
    http://screencast.com/t/AbxfbNm194

    Greetings,
    Stoich
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
  7. Mariko
    Mariko avatar
    39 posts
    Member since:
    Jun 2011

    Posted 11 Jul 2011 Link to this post

    Hi Stoich,

    Thanks, it is already working. But what is the difference of "Enable Silverlight" in the TestList to this line of code?

     

    this.Manager.Settings.Web.EnableSilverlight = true;

     

  8. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 13 Jul 2011 Link to this post

    Hi Mariko,
        essentially there's no difference. this.Manager.Settings will access the same settings file that you're test will use when you run it as part of a TestList.

    Best wishes,
    Stoich
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
Back to Top