!*< def
!define html ({{{  <textarea id="nothing"></textarea>
  <textarea id="withValue" value="red"></textarea>
  <textarea id="onlySpacesInText">   </textarea>
  <textarea id="withText">green</textarea>
  <textarea id="disabled" disabled="true">blue</textarea>
  <textarea id="withMultiText">yellow
orange</textarea>}}})
*!

|''keywords''|chrome,htmlunit,firefox,ie|

!include -c <FitLibraryWeb.SpiderFixture.SpecifySpiderFixture.SpecSetUp

|''with html''|${html}|
 * Firefox can only handle a textarea if it has a separate closing tag.
|''text of''|//textarea[@id="nothing"]|''matches''||

|''text of''|//textarea[@id="disabled"]|''matches''|blue|

|''text of''|//textarea[@id="onlySpacesInText"]|''matches''||

|''text of''|//textarea[@id="withText"]|''matches''|green|

|''text of''|//textarea[@id="withText"]|''matches''|gr.*n|

 * \n in text gets converted into a space in htmlUnit and is removed in Selenium:
|''text of''|//textarea[@id="withMultiText"]|''matches''|yellow.*orange|
 * The value of a <textarea> is ignored:
|''text of''|//textarea[@id="withValue"]|''matches''||
