Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Trouble setting form value with IE COM Object

Reply
 
Old 09-04-2009   #1 (permalink)
Henson Sturgill


 
 

Trouble setting form value with IE COM Object

I'm trying to write a small script to login to the mobile Facebook site so
that I can mine the contact information from my friends (Facebook doesn't
have an export.) Unfortunately, whenever I run this script I get the error:

"Property 'value' cannot be found on this object; make sure it exists and is
settable.
At C:\Users\BigEyedDad\Documents\fbContacts.ps1:16 char:8
+ $email. <<<< value = "test""

Here's what I've got so far:

-------[ CODE ]-------

$ie = New-Object -COM InternetExplorer.Application
$ie.navigate("http://m.facebook.com")
$ie.visible = $true

start-sleep 5

#grab form elements for login
$email = $ie.document.getElementsByName("email")
$pass = $ie.document.getElementsByName("pass")
$button = $ie.document.getElementsByName("login")

start-sleep 1

#set values
$email.value = "test"

-------[ END CODE ]-------

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Having trouble setting up 4OD Vista installation & setup
Setting object properties PowerShell
setting up e-mail for a frontpage 2002 form Vista General
Internet Explorer form fill-in setting? Vista General
The binary form of an ACE object is invalid PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46