0
  • Windows 7 32b
  • Powershell v2, default
  • Powershell v3, upgraded manually when v2 did not work from KB2506143.
  • Powershell v4, upgraded after having back v2 from KB2819745.
  • IE 11.0.9600, not instaled, just what was with the OS. Protected mode turned off.

Tried the script in admin mode - this is as far as I can go securitywise, not gonna remove antivirus or stop firewall or anything else as ludacrious. Tried a lot ... nothing gives anything from the webpage. Any webpage.

$ie = New-Object -com InternetExplorer.Application
$ie.visible = $true
$ie.silent = $true
$ie.Navigate("https://www.facebook.com/login.php")
while($ie.busy){Start-Sleep 1}
$ie.Document.getElementById("email").value = "aaaaaaa"

Error: Cannot find an overload for "getElementById" and the argument count: "1". How do I get information from the page? Need to interact with the page, fill forms, click, etc.

uldics
  • 117
  • 1
  • 11
  • Your snippet works for me withe same configuration except for Windows 7 where I use a 64b. – JPBlanc Nov 22 '14 at 09:00
  • same config as @JPBlanc works fine for me too, have you tried resetting your ie config like suggested in this thread http://stackoverflow.com/questions/24660691/cannot-find-an-overload-for-getelementbyid-and-the-argument-count-1 ? – Paul Nov 22 '14 at 14:45
  • IE settings reset to default. IE Enhanced Security Configuration - dont have it, not a server. Suppose not relevant. Add the desired URL to Compatibility View. No change in behaviour. Run PS as admin, lowered all the securities in IE options, added and removed to trusted sites. No change either. – uldics Nov 23 '14 at 15:23
  • Weirdly enough got it to work by uninstalling (Control panel, Programs and features, Uninstall an update) Internet Explorer 11. After restart there was IE 9, which again didnt work. Uninstalled it same way, and there it was - IE 8 and my snippet added the aaaaaaa to the name field. Not a good solution, but for now it works. Interesting, that $ie.document | gm gives TypeName: System.__ComObject# etc etc, not TypeName: mshtml.HTMLDocumentClass, which could be expected after reading other threads of such problems. – uldics Nov 23 '14 at 16:02

0 Answers0