Updates to TextArea not saving.

4 posts, 0 answers
  1. Matt
    Matt avatar
    19 posts
    Member since:
    Dec 2013

    Posted 07 Feb 2014 Link to this post

    Hi,

    I am using WebAii / Telerik Testing Framework with C#.

    I've run into an issue with a TextArea tag on my site.

    1.<textarea id="msgBody" class="messageBody">TEXT</textarea>

    I have issued the following code:

    1.public void enterMessageText(string message) {
    2.    msgBodyTextArea.Text = message;
    3.}

    The field updates visually with the new message, let's say "Hello, world!"

    1.<textarea id="msgBody" class="messageBody">Hello, world!</textarea>

    However, when I go to save the issue, apparently the save feature I have will render the old display "TEXT".

    This does not occur when I manually type in the Text Area.

    Any help would be appreciated.

  2. Matt
    Matt avatar
    19 posts
    Member since:
    Dec 2013

    Posted 07 Feb 2014 in reply to Matt Link to this post

    Don't know how to edit my post. Here's the code for getting that "msgBodyTextArea" control.

    1.public HtmlTextArea msgBodyTextArea {
    2.     get {
    3.           return ActiveBrowser.Find.ById<HtmlTextArea>("msgBody");
    4.     }
    5.}
  3. Matt
    Matt avatar
    19 posts
    Member since:
    Dec 2013

    Posted 07 Feb 2014 Link to this post

    I have resolved the issue myself after much pounding of my head into my desk:

    1.public void enterMessageText(string message) {
    2.            msgBodyTextArea.Text = message;
    3.            msgBodyTextArea.InvokeEvent(ScriptEventType.OnChange);
    4.            browser.refreshDomTree();
    5.        }
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 12 Feb 2014 Link to this post

    Hello Matt,

    I am glad to hear it.

    If you need additional help, please let us know.

    Regards,
    Boyan Boev
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top