I'm accessing the InternetExplorer.Application
COM through Powershell. I'm trying to use the querySelector
of the document
, but it doesn't return any result. I'm currently using IE8.
$ie = New-Object -com "InternetExplorer.Application"
$ie.visible = $true
$ie.Navigate("www.google.com")
if ($ie.Busy) { Start-Sleep 1 }
# This statement works
@($ie.Document.getElementsByTagName("a"))[0]
# This statement doesn't work, though querySelectorAll
# exist in the document object
@($ie.Document.querySelectorAll("a"))[0]
# I tried this
$ie.Document.querySelectorAll("a") -eq $null # evaluates to True