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

Element.InnerMarkup not working in IE11/Chrome/FF for TEXTAREA

1 Answer 43 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 28 Feb 2014, 06:50 PM
Hello,

I have an issue with getting the InnerMarkup of a TextArea element in different browsers.

I have the following HTML appear in IE 10:
<textarea id="msgBody"><b> <i>Text</i></b></textarea>

I want to grab the InnerMarkup inside the <textarea></textarea> return a string that would end up being "<b><i>Text</i></b>" instead of "<b> <i>Text</i></b>"

This works fine in IE 10.

However, in IE 11, Chrome 32, and Firefox, it returns me an empty string.

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 06 Mar 2014, 09:33 AM
Hello Matt,

Thank you for contacting Telerik support.

What code do you use to pick up the InnerMarkup? I tried with this one and it works correctly in all browsers:

HtmlTextArea area = ActiveBrowser.Find.ById<HtmlTextArea>("msgBody");
Log.WriteLine(area.BaseElement.InnerMarkup.ToString());

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Matt
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or