Understanding Powershell HRESULT: 0x800A01B6 Error getElementById

1

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?

powershell
internet-explorer
getelementbyid
asked on Stack Overflow Jan 16, 2017 by STWilson

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0