Пользователь пока ничего не рассказал о себе

Наибольший вклад в теги

Все теги (5)

Лучшие ответы пользователя

Все ответы (5)
  • Сравнение объектов Powershell+Selenium+Chrome и Powershell+IE, почему такая огромная разница?

    @IvanSstarr Автор вопроса
    Написал функцию (костыль), проблема частично решена

    function get-all-attribute-web-SE-elements($web_element){
    $attributs = "className","id","tagName","parentElement","style","onhelp","onclick","ondblclick","onkeydown","onkeyup","onkeypress","onmouseout","onmouseover","onmousemove","onmousedown","onmouseup","document","title","language","onselectstart","sourceIndex","recordNumber","lang","offsetLeft","offsetTop","offsetWidth","offsetHeight","offsetParent","innerHTML","innerText","outerHTML","outerText","parentTextEdit","isTextEdit","filters","ondragstart","onbeforeupdate","onafterupdate","onerrorupdate","onrowexit","onrowenter","ondatasetchanged","ondataavailable","ondatasetcomplete","onfilterchange","children","all","scopeName","onlosecapture","onscroll","ondrag","ondragend","ondragenter","ondragover","ondragleave","ondrop","onbeforecut","oncut","onbeforecopy","oncopy","onbeforepaste","onpaste","currentStyle","onpropertychange","tabIndex","accessKey","onblur","onfocus","onresize","clientHeight","clientWidth","clientTop","clientLeft","readyState","onreadystatechange","onrowsdelete","onrowsinserted","oncellchange","dir","scrollHeight","scrollWidth","scrollTop","scrollLeft","oncontextmenu","canHaveChildren","runtimeStyle","behaviorUrns","tagUrn","onbeforeeditfocus","isMultiLine","canHaveHTML","onlayoutcomplete","onpage","onbeforedeactivate","contentEditable","isContentEditable","hideFocus","disabled","isDisabled","onmove","oncontrolselect","onresizestart","onresizeend","onmovestart","onmoveend","onmouseenter","onmouseleave","onactivate","ondeactivate","onmousewheel","onbeforeactivate","onfocusin","onfocusout","uniqueNumber","uniqueID","nodeType","parentNode","childNodes","attributes","nodeName","nodeValue","firstChild","lastChild","previousSibling","nextSibling","ownerDocument","prefix","localName","namespaceURI","textContent","dataFld","dataSrc","dataFormatAs","role","ariaBusy","ariaChecked","ariaDisabled","ariaExpanded","ariaHaspopup","ariaHidden","ariaInvalid","ariaMultiselectable","ariaPressed","ariaReadonly","ariaRequired","ariaSecret","ariaSelected","ie8_attributes","ariaValuenow","ariaPosinset","ariaSetsize","ariaLevel","ariaValuemin","ariaValuemax","ariaControls","ariaDescribedby","ariaFlowto","ariaLabelledby","ariaActivedescendant","ariaOwns","ariaLive","ariaRelevant","ie9_tagName","ie9_nodeName","onabort","oncanplay","oncanplaythrough","onchange","ondurationchange","onemptied","onended","onerror","oninput","onload","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onreset","onseeked","onseeking","onselect","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting","constructor","onmspointerdown","onmspointermove","onmspointerup","onmspointerover","onmspointerout","onmspointercancel","onmspointerhover","onmslostpointercapture","onmsgotpointercapture","onmsgesturestart","onmsgesturechange","onmsgestureend","onmsgesturehold","onmsgesturetap","onmsgesturedoubletap","onmsinertiastart","onmstransitionstart","onmstransitionend","onmsanimationstart","onmsanimationend","onmsanimationiteration","oninvalid","xmsAcceleratorKey","spellcheck","onmsmanipulationstatechanged","oncuechange","type","value","name","status","form","ie9_type"
    for ($a = 0;$a -lt $attributs.Count; $a++){
    if($web_element.GetAttribute($attributs[$a].Split(":")[0].TrimEnd(" ")).Length -gt 0){
    Write-Host $attributs[$a].PadRight(28, " ") ": " $web_element.GetAttribute($attributs[$a].Split(":")[0].TrimEnd(" "))
    }}}

    Запускаем функцию:
    get-all-attribute-web-SE-elements ($Driver.FindElementsByClassName("button")[1])

    Получаем:
    5c6d16ba25272859875608.jpeg
    Ответ написан
    Комментировать

Лучшие вопросы пользователя

Все вопросы (6)