I am creating automatic testing using Windows Powershell to test a web gui. I need to get the value out of this:
<td>
Name:
</td>
<td id = "Name">
Clark Kent
</td>
I was thinking I could access it the same as any other HTML element by using getElementByID("Name") but when I run this:
$doc = $ie.document
$name = $doc.getElementByID("Name")
write-host $name.value
The output is just a blank string; and this:
write-host "The field is $name.value"
Outputs: "The field is mshtml.HTMLTableCellClass.Value"
Any idea how I would access this value?