Getting text of MultiLineTextBox seems not work

Nov 9, 2010 at 9:21 AM


I try to get the value of a MultiLineTextBox by this way


multiLineTxtBox = win.Get<MultilineTextBox>(SearchCriteria.ByControlType(ControlType.Document));

string value= multiLineTxtBox.Text;


, but it throws following exception:

Error when invoking get_Text, on MultilineTextBox with parameters:

 I found that the name of MultilineTextBox has only the first character. It should be "This is a imported text document.", but

from the output of multiLineTxtBox.ToString(), I get the followings:

MultilineTextBox. AutomationId:12985, Name:T, ControlType:Dokument, FrameworkId:Win32

How can I get the content of MultilineTextBox? Actuelly, this MultilineTextBox is read-only. But when I try to get

IsReadOnly information. It shows also the exception:

Error when invoking get_IsReadOnly, on MultilineTextBox with parameters:

Nov 9, 2010 at 9:30 AM



This is  a known bug, many operations on this item throws  exception.

workaround => use UIAomation operations for this (Textpattern)


to set text






Nov 9, 2010 at 9:42 AM

Hallo, Throndorin,

Thanks for your answer. I have no problem with setting the value, but for getting the value of the only-read multilinetextbox.

But I try UIAomation operations to get it, and check, whether it works or not.