无法找到IE COM对象的下拉框

时间:2018-04-11 14:41:48

标签: powershell

我目前设置此脚本以在网页上找到下拉列表。

$racked = $ie.document.getElementsByName('ev_43980_Location.Racked')

但我遇到的问题是它似乎想要进入它在页面上找到的第一组表,然后不要让它在其他存储该元素的地方进行搜索。

<table id="toggle_id1" width="450" class="expanderShow1" style="display: block;">
<!-- end of expander table head -->

这是它击中并且不想离开的第一张表。

这是元素所在的表:

<table id="toggle_id7" width="450" class="expanderShow1">
<!-- end of expander table head -->

任何人都知道如何让它来搜索他们机器上的下拉列表?

谢谢

已编辑

命令中的代码 $racked = $ie.document.getElementById('toggle_id7') | Get-Member

Name                         MemberType Definition
----                         ---------- ----------
addBehavior                  Method     int addBehavior (string, Variant)
addFilter                    Method     void addFilter (IUnknown)
appendChild                  Method     IHTMLDOMNode appendChild (IHTMLDOMNode)
applyElement                 Method     IHTMLElement applyElement (IHTMLElement, string)
attachEvent                  Method     bool attachEvent (string, IDispatch)
blur                         Method     void blur ()
clearAttributes              Method     void clearAttributes ()
click                        Method     void click ()
cloneNode                    Method     IHTMLDOMNode cloneNode (bool)
compareDocumentPosition      Method     ushort compareDocumentPosition (IHTMLDOMNode)
componentFromPoint           Method     string componentFromPoint (int, int)
contains                     Method     bool contains (IHTMLElement)
createCaption                Method     IHTMLTableCaption createCaption ()
createControlRange           Method     IDispatch createControlRange ()
createTBody                  Method     IHTMLTableSection createTBody ()
createTFoot                  Method     IDispatch createTFoot ()
createTHead                  Method     IDispatch createTHead ()
deleteCaption                Method     void deleteCaption ()
deleteRow                    Method     void deleteRow (int)
deleteTFoot                  Method     void deleteTFoot ()
deleteTHead                  Method     void deleteTHead ()
detachEvent                  Method     void detachEvent (string, IDispatch)
doScroll                     Method     void doScroll (Variant)
dragDrop                     Method     bool dragDrop ()
FireEvent                    Method     bool FireEvent (string, Variant)
firstPage                    Method     void firstPage ()
focus                        Method     void focus ()
getAdjacentText              Method     string getAdjacentText (string)
getAttribute                 Method     Variant getAttribute (string, int)
getAttributeNode             Method     IHTMLDOMAttribute getAttributeNode (string)
getAttributeNodeNS           Method     IHTMLDOMAttribute2 getAttributeNodeNS (Variant, string)
getAttributeNS               Method     Variant getAttributeNS (Variant, string)
getBoundingClientRect        Method     IHTMLRect getBoundingClientRect ()
getClientRects               Method     IHTMLRectCollection getClientRects ()
getElementsByClassName       Method     IHTMLElementCollection getElementsByClassName (string)
getElementsByTagName         Method     IHTMLElementCollection getElementsByTagName (string)
getElementsByTagNameNS       Method     IHTMLElementCollection getElementsByTagNameNS (Variant, string)
getExpression                Method     Variant getExpression (string)
hasAttribute                 Method     bool hasAttribute (string)
hasAttributeNS               Method     bool hasAttributeNS (Variant, string)
hasAttributes                Method     bool hasAttributes ()
hasChildNodes                Method     bool hasChildNodes ()
ie8_getAttribute             Method     Variant ie8_getAttribute (string)
ie8_getAttributeNode         Method     IHTMLDOMAttribute2 ie8_getAttributeNode (string)
ie8_removeAttribute          Method     bool ie8_removeAttribute (string)
ie8_removeAttributeNode      Method     IHTMLDOMAttribute2 ie8_removeAttributeNode (IHTMLDOMAttribute2)
ie8_setAttribute             Method     void ie8_setAttribute (string, Variant)
ie8_setAttributeNode         Method     IHTMLDOMAttribute2 ie8_setAttributeNode (IHTMLDOMAttribute2)
ie9_appendChild              Method     IHTMLDOMNode ie9_appendChild (IHTMLDOMNode)
ie9_deleteRow                Method     void ie9_deleteRow (int)
ie9_getAttribute             Method     Variant ie9_getAttribute (string)
ie9_getAttributeNode         Method     IHTMLDOMAttribute2 ie9_getAttributeNode (string)
ie9_hasAttribute             Method     bool ie9_hasAttribute (string)
ie9_hasAttributes            Method     bool ie9_hasAttributes ()
ie9_insertBefore             Method     IHTMLDOMNode ie9_insertBefore (IHTMLDOMNode, Variant)
ie9_insertRow                Method     IDispatch ie9_insertRow (int)
ie9_removeAttribute          Method     void ie9_removeAttribute (string)
ie9_removeAttributeNode      Method     IHTMLDOMAttribute2 ie9_removeAttributeNode (IHTMLDOMAttribute2)
ie9_removeChild              Method     IHTMLDOMNode ie9_removeChild (IHTMLDOMNode)
ie9_replaceChild             Method     IHTMLDOMNode ie9_replaceChild (IHTMLDOMNode, IHTMLDOMNode)
ie9_setAttribute             Method     void ie9_setAttribute (string, Variant)
ie9_setAttributeNode         Method     IHTMLDOMAttribute2 ie9_setAttributeNode (IHTMLDOMAttribute2)
insertAdjacentElement        Method     IHTMLElement insertAdjacentElement (string, IHTMLElement)
insertAdjacentHTML           Method     void insertAdjacentHTML (string, string)
insertAdjacentText           Method     void insertAdjacentText (string, string)
insertBefore                 Method     IHTMLDOMNode insertBefore (IHTMLDOMNode, Variant)
insertRow                    Method     IDispatch insertRow (int)
isDefaultNamespace           Method     bool isDefaultNamespace (Variant)
isEqualNode                  Method     bool isEqualNode (IHTMLDOMNode3)
isSameNode                   Method     bool isSameNode (IHTMLDOMNode3)
isSupported                  Method     bool isSupported (string, Variant)
lastPage                     Method     void lastPage ()
lookupNamespaceURI           Method     Variant lookupNamespaceURI (Variant)
lookupPrefix                 Method     Variant lookupPrefix (Variant)
mergeAttributes              Method     void mergeAttributes (IHTMLElement, Variant)
moveRow                      Method     IDispatch moveRow (int, int)
msMatchesSelector            Method     bool msMatchesSelector (string)
msReleasePointerCapture      Method     void msReleasePointerCapture (int)
msSetPointerCapture          Method     void msSetPointerCapture (int)
nextPage                     Method     void nextPage ()
normalize                    Method     void normalize ()
previousPage                 Method     void previousPage ()
querySelector                Method     IHTMLElement querySelector (string)
querySelectorAll             Method     IHTMLDOMChildrenCollection querySelectorAll (string)
refresh                      Method     void refresh ()
releaseCapture               Method     void releaseCapture ()
removeAttribute              Method     bool removeAttribute (string, int)
removeAttributeNode          Method     IHTMLDOMAttribute removeAttributeNode (IHTMLDOMAttribute)
removeAttributeNS            Method     void removeAttributeNS (Variant, string)
removeBehavior               Method     bool removeBehavior (int)
removeChild                  Method     IHTMLDOMNode removeChild (IHTMLDOMNode)
removeExpression             Method     bool removeExpression (string)
removeFilter                 Method     void removeFilter (IUnknown)
removeNode                   Method     IHTMLDOMNode removeNode (bool)
replaceAdjacentText          Method     string replaceAdjacentText (string, string)
replaceChild                 Method     IHTMLDOMNode replaceChild (IHTMLDOMNode, IHTMLDOMNode)
replaceNode                  Method     IHTMLDOMNode replaceNode (IHTMLDOMNode)
scrollIntoView               Method     void scrollIntoView (Variant)
setActive                    Method     void setActive ()
setAttribute                 Method     void setAttribute (string, Variant, int)
setAttributeNode             Method     IHTMLDOMAttribute setAttributeNode (IHTMLDOMAttribute)
setAttributeNodeNS           Method     IHTMLDOMAttribute2 setAttributeNodeNS (IHTMLDOMAttribute2)
setAttributeNS               Method     void setAttributeNS (Variant, string, Variant)
setCapture                   Method     void setCapture (bool)
setExpression                Method     void setExpression (string, string, string)
swapNode                     Method     IHTMLDOMNode swapNode (IHTMLDOMNode)
toString                     Method     string toString ()
accessKey                    Property   string accessKey () {get} {set}
align                        Property   string align () {get} {set}
all                          Property   IDispatch all () {get}
ariaActivedescendant         Property   string ariaActivedescendant () {get} {set}
ariaBusy                     Property   string ariaBusy () {get} {set}
ariaChecked                  Property   string ariaChecked () {get} {set}
ariaControls                 Property   string ariaControls () {get} {set}
ariaDescribedby              Property   string ariaDescribedby () {get} {set}
ariaDisabled                 Property   string ariaDisabled () {get} {set}
ariaExpanded                 Property   string ariaExpanded () {get} {set}
ariaFlowto                   Property   string ariaFlowto () {get} {set}
ariaHaspopup                 Property   string ariaHaspopup () {get} {set}
ariaHidden                   Property   string ariaHidden () {get} {set}
ariaInvalid                  Property   string ariaInvalid () {get} {set}
ariaLabelledby               Property   string ariaLabelledby () {get} {set}
ariaLevel                    Property   short ariaLevel () {get} {set}
ariaLive                     Property   string ariaLive () {get} {set}
ariaMultiselectable          Property   string ariaMultiselectable () {get} {set}
ariaOwns                     Property   string ariaOwns () {get} {set}
ariaPosinset                 Property   short ariaPosinset () {get} {set}
ariaPressed                  Property   string ariaPressed () {get} {set}
ariaReadonly                 Property   string ariaReadonly () {get} {set}
ariaRelevant                 Property   string ariaRelevant () {get} {set}
ariaRequired                 Property   string ariaRequired () {get} {set}
ariaSecret                   Property   string ariaSecret () {get} {set}
ariaSelected                 Property   string ariaSelected () {get} {set}
ariaSetsize                  Property   short ariaSetsize () {get} {set}
ariaValuemax                 Property   string ariaValuemax () {get} {set}
ariaValuemin                 Property   string ariaValuemin () {get} {set}
ariaValuenow                 Property   string ariaValuenow () {get} {set}
attributes                   Property   IDispatch attributes () {get}
background                   Property   string background () {get} {set}
behaviorUrns                 Property   IDispatch behaviorUrns () {get}
bgColor                      Property   Variant bgColor () {get} {set}
border                       Property   Variant border () {get} {set}
borderColor                  Property   Variant borderColor () {get} {set}
borderColorDark              Property   Variant borderColorDark () {get} {set}
borderColorLight             Property   Variant borderColorLight () {get} {set}
canHaveChildren              Property   bool canHaveChildren () {get}
canHaveHTML                  Property   bool canHaveHTML () {get}
caption                      Property   IHTMLTableCaption caption () {get}
cellPadding                  Property   Variant cellPadding () {get} {set}
cells                        Property   IHTMLElementCollection cells () {get}
cellSpacing                  Property   Variant cellSpacing () {get} {set}
childNodes                   Property   IDispatch childNodes () {get}
children                     Property   IDispatch children () {get}
className                    Property   string className () {get} {set}
clientHeight                 Property   int clientHeight () {get}
clientLeft                   Property   int clientLeft () {get}
clientTop                    Property   int clientTop () {get}
clientWidth                  Property   int clientWidth () {get}
cols                         Property   int cols () {get} {set}
constructor                  Property   IDispatch constructor () {get}
contentEditable              Property   string contentEditable () {get} {set}
currentStyle                 Property   IHTMLCurrentStyle currentStyle () {get}
dataFld                      Property   string dataFld () {get} {set}
dataFormatAs                 Property   string dataFormatAs () {get} {set}
dataPageSize                 Property   int dataPageSize () {get} {set}
dataSrc                      Property   string dataSrc () {get} {set}
dir                          Property   string dir () {get} {set}
disabled                     Property   bool disabled () {get} {set}
document                     Property   IDispatch document () {get}
filters                      Property   IHTMLFiltersCollection filters () {get}
firstChild                   Property   IHTMLDOMNode firstChild () {get}
frame                        Property   string frame () {get} {set}
height                       Property   Variant height () {get} {set}
hideFocus                    Property   bool hideFocus () {get} {set}
id                           Property   string id () {get} {set}
ie8_attributes               Property   IHTMLAttributeCollection3 ie8_attributes () {get}
ie9_caption                  Property   IHTMLTableCaption ie9_caption () {get} {set by ref}
ie9_nodeName                 Property   string ie9_nodeName () {get}
ie9_tagName                  Property   string ie9_tagName () {get}
ie9_tFoot                    Property   IHTMLTableSection ie9_tFoot () {get} {set by ref}
ie9_tHead                    Property   IHTMLTableSection ie9_tHead () {get} {set by ref}
innerHTML                    Property   string innerHTML () {get} {set}
innerText                    Property   string innerText () {get} {set}
isContentEditable            Property   bool isContentEditable () {get}
isDisabled                   Property   bool isDisabled () {get}
isMultiLine                  Property   bool isMultiLine () {get}
isTextEdit                   Property   bool isTextEdit () {get}
lang                         Property   string lang () {get} {set}
language                     Property   string language () {get} {set}
lastChild                    Property   IHTMLDOMNode lastChild () {get}
localName                    Property   Variant localName () {get}
namespaceURI                 Property   Variant namespaceURI () {get}
nextSibling                  Property   IHTMLDOMNode nextSibling () {get}
nodeName                     Property   string nodeName () {get}
nodeType                     Property   int nodeType () {get}
nodeValue                    Property   Variant nodeValue () {get} {set}
offsetHeight                 Property   int offsetHeight () {get}
offsetLeft                   Property   int offsetLeft () {get}
offsetParent                 Property   IHTMLElement offsetParent () {get}
offsetTop                    Property   int offsetTop () {get}
offsetWidth                  Property   int offsetWidth () {get}
onabort                      Property   Variant onabort () {get} {set}
onactivate                   Property   Variant onactivate () {get} {set}
onafterupdate                Property   Variant onafterupdate () {get} {set}
onbeforeactivate             Property   Variant onbeforeactivate () {get} {set}
onbeforecopy                 Property   Variant onbeforecopy () {get} {set}
onbeforecut                  Property   Variant onbeforecut () {get} {set}
onbeforedeactivate           Property   Variant onbeforedeactivate () {get} {set}
onbeforeeditfocus            Property   Variant onbeforeeditfocus () {get} {set}
onbeforepaste                Property   Variant onbeforepaste () {get} {set}
onbeforeupdate               Property   Variant onbeforeupdate () {get} {set}
onblur                       Property   Variant onblur () {get} {set}
oncanplay                    Property   Variant oncanplay () {get} {set}
oncanplaythrough             Property   Variant oncanplaythrough () {get} {set}
oncellchange                 Property   Variant oncellchange () {get} {set}
onchange                     Property   Variant onchange () {get} {set}
onclick                      Property   Variant onclick () {get} {set}
oncontextmenu                Property   Variant oncontextmenu () {get} {set}
oncontrolselect              Property   Variant oncontrolselect () {get} {set}
oncopy                       Property   Variant oncopy () {get} {set}
oncuechange                  Property   Variant oncuechange () {get} {set}
oncut                        Property   Variant oncut () {get} {set}
ondataavailable              Property   Variant ondataavailable () {get} {set}
ondatasetchanged             Property   Variant ondatasetchanged () {get} {set}
ondatasetcomplete            Property   Variant ondatasetcomplete () {get} {set}
ondblclick                   Property   Variant ondblclick () {get} {set}
ondeactivate                 Property   Variant ondeactivate () {get} {set}
ondrag                       Property   Variant ondrag () {get} {set}
ondragend                    Property   Variant ondragend () {get} {set}
ondragenter                  Property   Variant ondragenter () {get} {set}
ondragleave                  Property   Variant ondragleave () {get} {set}
ondragover                   Property   Variant ondragover () {get} {set}
ondragstart                  Property   Variant ondragstart () {get} {set}
ondrop                       Property   Variant ondrop () {get} {set}
ondurationchange             Property   Variant ondurationchange () {get} {set}
onemptied                    Property   Variant onemptied () {get} {set}
onended                      Property   Variant onended () {get} {set}
onerror                      Property   Variant onerror () {get} {set}
onerrorupdate                Property   Variant onerrorupdate () {get} {set}
onfilterchange               Property   Variant onfilterchange () {get} {set}
onfocus                      Property   Variant onfocus () {get} {set}
onfocusin                    Property   Variant onfocusin () {get} {set}
onfocusout                   Property   Variant onfocusout () {get} {set}
onhelp                       Property   Variant onhelp () {get} {set}
oninput                      Property   Variant oninput () {get} {set}
oninvalid                    Property   Variant oninvalid () {get} {set}
onkeydown                    Property   Variant onkeydown () {get} {set}
onkeypress                   Property   Variant onkeypress () {get} {set}
onkeyup                      Property   Variant onkeyup () {get} {set}
onlayoutcomplete             Property   Variant onlayoutcomplete () {get} {set}
onload                       Property   Variant onload () {get} {set}
onloadeddata                 Property   Variant onloadeddata () {get} {set}
onloadedmetadata             Property   Variant onloadedmetadata () {get} {set}
onloadstart                  Property   Variant onloadstart () {get} {set}
onlosecapture                Property   Variant onlosecapture () {get} {set}
onmousedown                  Property   Variant onmousedown () {get} {set}
onmouseenter                 Property   Variant onmouseenter () {get} {set}
onmouseleave                 Property   Variant onmouseleave () {get} {set}
onmousemove                  Property   Variant onmousemove () {get} {set}
onmouseout                   Property   Variant onmouseout () {get} {set}
onmouseover                  Property   Variant onmouseover () {get} {set}
onmouseup                    Property   Variant onmouseup () {get} {set}
onmousewheel                 Property   Variant onmousewheel () {get} {set}
onmove                       Property   Variant onmove () {get} {set}
onmoveend                    Property   Variant onmoveend () {get} {set}
onmovestart                  Property   Variant onmovestart () {get} {set}
onmsanimationend             Property   Variant onmsanimationend () {get} {set}
onmsanimationiteration       Property   Variant onmsanimationiteration () {get} {set}
onmsanimationstart           Property   Variant onmsanimationstart () {get} {set}
onmsgesturechange            Property   Variant onmsgesturechange () {get} {set}
onmsgesturedoubletap         Property   Variant onmsgesturedoubletap () {get} {set}
onmsgestureend               Property   Variant onmsgestureend () {get} {set}
onmsgesturehold              Property   Variant onmsgesturehold () {get} {set}
onmsgesturestart             Property   Variant onmsgesturestart () {get} {set}
onmsgesturetap               Property   Variant onmsgesturetap () {get} {set}
onmsgotpointercapture        Property   Variant onmsgotpointercapture () {get} {set}
onmsinertiastart             Property   Variant onmsinertiastart () {get} {set}
onmslostpointercapture       Property   Variant onmslostpointercapture () {get} {set}
onmsmanipulationstatechanged Property   Variant onmsmanipulationstatechanged () {get} {set}
onmspointercancel            Property   Variant onmspointercancel () {get} {set}
onmspointerdown              Property   Variant onmspointerdown () {get} {set}
onmspointerhover             Property   Variant onmspointerhover () {get} {set}
onmspointermove              Property   Variant onmspointermove () {get} {set}
onmspointerout               Property   Variant onmspointerout () {get} {set}
onmspointerover              Property   Variant onmspointerover () {get} {set}
onmspointerup                Property   Variant onmspointerup () {get} {set}
onmstransitionend            Property   Variant onmstransitionend () {get} {set}
onmstransitionstart          Property   Variant onmstransitionstart () {get} {set}
onpage                       Property   Variant onpage () {get} {set}
onpaste                      Property   Variant onpaste () {get} {set}
onpause                      Property   Variant onpause () {get} {set}
onplay                       Property   Variant onplay () {get} {set}
onplaying                    Property   Variant onplaying () {get} {set}
onprogress                   Property   Variant onprogress () {get} {set}
onpropertychange             Property   Variant onpropertychange () {get} {set}
onratechange                 Property   Variant onratechange () {get} {set}
onreadystatechange           Property   Variant onreadystatechange () {get} {set}
onreset                      Property   Variant onreset () {get} {set}
onresize                     Property   Variant onresize () {get} {set}
onresizeend                  Property   Variant onresizeend () {get} {set}
onresizestart                Property   Variant onresizestart () {get} {set}
onrowenter                   Property   Variant onrowenter () {get} {set}
onrowexit                    Property   Variant onrowexit () {get} {set}
onrowsdelete                 Property   Variant onrowsdelete () {get} {set}
onrowsinserted               Property   Variant onrowsinserted () {get} {set}
onscroll                     Property   Variant onscroll () {get} {set}
onseeked                     Property   Variant onseeked () {get} {set}
onseeking                    Property   Variant onseeking () {get} {set}
onselect                     Property   Variant onselect () {get} {set}
onselectstart                Property   Variant onselectstart () {get} {set}
onstalled                    Property   Variant onstalled () {get} {set}
onsubmit                     Property   Variant onsubmit () {get} {set}
onsuspend                    Property   Variant onsuspend () {get} {set}
ontimeupdate                 Property   Variant ontimeupdate () {get} {set}
onvolumechange               Property   Variant onvolumechange () {get} {set}
onwaiting                    Property   Variant onwaiting () {get} {set}
outerHTML                    Property   string outerHTML () {get} {set}
outerText                    Property   string outerText () {get} {set}
ownerDocument                Property   IDispatch ownerDocument () {get}
parentElement                Property   IHTMLElement parentElement () {get}
parentNode                   Property   IHTMLDOMNode parentNode () {get}
parentTextEdit               Property   IHTMLElement parentTextEdit () {get}
prefix                       Property   Variant prefix () {get} {set}
previousSibling              Property   IHTMLDOMNode previousSibling () {get}
readyState                   Property   Variant readyState () {get}
recordNumber                 Property   Variant recordNumber () {get}
role                         Property   string role () {get} {set}
rows                         Property   IHTMLElementCollection rows () {get}
rules                        Property   string rules () {get} {set}
runtimeStyle                 Property   IHTMLStyle runtimeStyle () {get}
scopeName                    Property   string scopeName () {get}
scrollHeight                 Property   int scrollHeight () {get}
scrollLeft                   Property   int scrollLeft () {get} {set}
scrollTop                    Property   int scrollTop () {get} {set}
scrollWidth                  Property   int scrollWidth () {get}
sourceIndex                  Property   int sourceIndex () {get}
spellcheck                   Property   Variant spellcheck () {get} {set}
style                        Property   IHTMLStyle style () {get}
summary                      Property   string summary () {get} {set}
tabIndex                     Property   short tabIndex () {get} {set}
tagName                      Property   string tagName () {get}
tagUrn                       Property   string tagUrn () {get} {set}
tBodies                      Property   IHTMLElementCollection tBodies () {get}
textContent                  Property   Variant textContent () {get} {set}
tFoot                        Property   IHTMLTableSection tFoot () {get}
tHead                        Property   IHTMLTableSection tHead () {get}
title                        Property   string title () {get} {set}
uniqueID                     Property   string uniqueID () {get}
uniqueNumber                 Property   int uniqueNumber () {get}
width                        Property   Variant width () {get} {set}
xmsAcceleratorKey            Property   string xmsAcceleratorKey () {get} {set}

0 个答案:

没有答案