Answer the question
In order to leave comments, you need to log in
Why is the error "Exception from HRESULT: 0x80020101" thrown when calling getElementById()?
I am writing a script in Powershell.
1. When trying to get an element into a variable, an exception is thrown.
$ie = New-Object -ComObject "InternetExplorer.application"
$ie.visible = 1
while ($ie.Busy -eq $true) { Start-Sleep 1 }
$ie.Navigate("http://vk.com")
$ie.Document.getElementById('quick_email').value = 'mail'
$ie.Document.getElementById('quick_pass').value = 'pass'
$ie.Document.getElementById("quick_login_button").click();
$ie.Document.forms[0].elements[8].value = 'email'
$ie.Document.forms[0].elements[9].value = 'pass'
Answer the question
In order to leave comments, you need to log in
Your code works OK for me like this:
$ie = New-Object -ComObject "InternetExplorer.application"
$ie.visible = 1
$ie.Navigate("http://vk.com")
while ($ie.Busy -eq $true) { Start-Sleep 1 }
$ie.Document.getElementById('quick_email').value = 'mail'
$ie.Document.getElementById('quick_pass').value = 'pass'
$ie.Document.getElementById("quick_login_button").click();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question