![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Issue need your help: How to control combox/dropdownlist in web page? Hi, Here is an issue need your help, very appricate you if can provide any ideas... [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Web") $webclient = new-object System.Net.WebClient $oIE=new-object -com internetexplorer.application $oIE.visible=$true $oIE.navigate2($passportSignUP) while ($oIE.busy) { sleep -milliseconds 1000 } sleep -milliseconds 3000 $oIE.document.getElementById("imembername").value = $myidalias $oIE.document.getElementById("iPwd").value = "password" $oIE.document.getElementById("iRetypePwd").value = "password" $oIE.document.getElementById("iSQ").SelectedIndex = "1" $oIE.document.getElementById("iSA").value = "The Green Mile" $oIE.document.getElementById("iFirstName").value = "Min" $oIE.document.getElementById("iLastName").value = "Zhang" When you in Windows Live ID sign up page, we can type text in textbox easily by DOM method e.g. $oIE.document.getElementById("iSA").value = "The Green Mile" , but how to control combox/dropdownlist in web page? Thanks much for your help! Belem |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Issue need your help: How to control combox/dropdownlist in web page? What do you mean by "control?" You should be able to just set the drop-down's Value property if you want to change its value. I believed you can change the Selected property of an <Option> object to force it to be selected, but there's no programmatic way to visually "drop" the list. You might re-post in one of the DHTML newsgroups, as this is the type of thing those guys deal with almost daily - you really need to know how the DOM does this, rather than how the IE COM object behaves or how PowerShell treats it. -- Don Jones Windows PowerShell MVP Founder: www.ScriptingAnswers.com Co-Author: "Windows PowerShell: TFM" "belem" <belem.2pqg81@no-mx.forums.net> wrote in message news:belem.2pqg81@no-mx.forums.net... > > Hi, > > Here is an issue need your help, very appricate you if can provide any > ideas... > > [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Web") > $webclient = new-object System.Net.WebClient > $oIE=new-object -com internetexplorer.application > $oIE.visible=$true > > $oIE.navigate2($passportSignUP) > while ($oIE.busy) { > sleep -milliseconds 1000 > } > sleep -milliseconds 3000 > $oIE.document.getElementById("imembername").value = $myidalias > $oIE.document.getElementById("iPwd").value = "password" > $oIE.document.getElementById("iRetypePwd").value = "password" > $oIE.document.getElementById("iSQ").SelectedIndex = "1" > $oIE.document.getElementById("iSA").value = "The Green Mile" > $oIE.document.getElementById("iFirstName").value = "Min" > $oIE.document.getElementById("iLastName").value = "Zhang" > > When you in Windows Live ID sign up page, we can type text in textbox > easily by DOM method e.g. $oIE.document.getElementById("iSA").value = > "The Green Mile" , but how to control combox/dropdownlist in web page? > > Thanks much for your help! ![]() > Belem > > > -- > belem |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Control IE et save a Web Page | PowerShell | |||
| How to copy dropdownlist to each other? | .NET General | |||
| control panel page as a shortcut ? | Vista General | |||
| ActiveX Control prompt "An ActiveX control on this page might be u | Vista General | |||