InternetExplorer.Application: invoke item from dropdown list

rated by 0 users
This post has 0 Replies | 1 Follower

Not Ranked
Posts 3
general_issimo Posted: 06-29-2012 2:05 AM

Hi everybody,

i am trying to use some item from a dropdown list.

It works all pretty fine besides one small thing.

There's a dropdown menue, and i am able to select the correct item. Nevertheless, for some reason, this item has to be invoked to reveal further options. Any ideas how to get this done?

#################

$list = import-csv "ANYPATH\input.csv"

$ie=New-Object -comobject InternetExplorer.Application

$ie.visible=$true
$ie.silent = $true
   
$ie.Navigate("http://ANYURL/Default.aspx")
while($ie.busy){Start-Sleep 3}

$doc = $ie.document

$myradios = $doc.getElementByID('button1').setActive()
$myradios = $doc.getElementByID('button1').click()


# take each line of input.csv and assign software-profile
  foreach ($entry in $list) {
  $pcname = $entry.pcname
  $profile = $entry.profile
  $ie.Document.getElementById("dropdownlist").value = $pcname
 
  #these following won't work. any ideas?
  #$ie.Document.getElementById("dropdownlist").Click()
  #$ie.Document.getElementById("dropdownlist").invoke()
  }

Page 1 of 1 (1 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.