I'm getting this error in a simple PowerShell script. "getElementByID" always takes 1 argument, so I'm not sure why this is failing. I'm using IE 11 and PowerShell 3 running on WS2K8 r2.
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate("http://duckduckgo.com")
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById("search_form_input_homepage").value = "foobar"
$ie.document.getElementById("search_button_homepage").Click()
resulting error message:
Cannot find an overload for "getElementById" and the argument count: "1". At C:\SCRIPTS\sample.ps1:5 char:1 + $ie.document.getElementById("search_form_input_homepage").value = "foobar" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodException + FullyQualifiedErrorId : MethodCountCouldNotFindBest