mardi 24 février 2015

Using Powershell to check Checkboxes in IE11

So I am using powershell to search a database that is based in HTML. The HTML with the checkbox is: INPUT name=extend id=perextend onchange=javascript:disabledPagination(); type=checkbox value=on


Now i have search and tried different options, but still no luck: $chk = $ie.Document.getElementsByTagName("extend") | where-object {$_.type -eq "checkbox"} $chk.Checked = $True But it give me an error: Property 'Checked' cannot be found on this object; make sure it exists and is se ttable. Property 'Checked' cannot be found on this object; make sure it exists and is settable. At D:\Data\Argos excel\Untitled1.ps1:51 char:1 + $chk.Checked = $True + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound


Any help would be great. And sorry I am new to powershell if its a common mistake





Aucun commentaire:

Enregistrer un commentaire