For the following question, $doc
is the .Document
of a -ComObject "InternetExplorer.Application"
I'm using Powershell 5.1, Windows 10.
What is the difference between methods:
$doc.getElementById("divdetails")
and
$doc.IHTMLDocument3_getElementById("divdetails")
?
The former worked for a day. The next morning, no change to the script and .getElementById()
resulted in error: HRESULT: 0x800A01B6
every time.
The solution on this page says to always use the latter version $doc.IHTMLDocument3_getElementById()
instead. Indeed, that fixes it. Why?
What's the difference?
User contributions licensed under CC BY-SA 3.0