Categories
Uncategorized

PowerShell Exception 0x800A01B6

I wanted to draw attention to this link to save somebody that headaches that I had trying to use $ie.Document.getElementById. Hope it helps.

Exception from HRESULT: 0x800A01B6
At line:21 char:1
+ $ie.Document.getElementById("RandomButton").click;while($ie.Busy) { St ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], NotSupportedException
+ FullyQualifiedErrorId : System.NotSupportedException

https://www.sepago.com/blog/2016/05/03/powershell-exception-0x800a01b6-while-using-getelementsbytagname-getelementsbyname

Always use the following methods instead of the native ones:

  1. IHTMLDocument3_getElementsByTagName
  2. IHTMLDocument3_getElementsByName
  3. IHTMLDocument3_getElementByID

 

2 replies on “PowerShell Exception 0x800A01B6”

Leave a Reply

Your email address will not be published. Required fields are marked *