Internet Explorer change drop down menu

Welcome Forums General PowerShell Q&A Internet Explorer change drop down menu

This topic contains 1 reply, has 2 voices, and was last updated by

4 years, 1 month ago.

  • Author
  • #23636

    Topics: 1
    Replies: 0
    Points: 0
    Rank: Member

    been trying to log into this ticketing webpage and download a report
    was able to get past the log in screen
    and then redirect to the search page

    I'm not able to change the drop down

    i tried following and

    with no luck. I commented out what i tried.

    i get this error message usually

    Property 'Selected' cannot be found on this object; make sure it exists and is settable.
    At C:\Users\max\Desktop\test\90.ps1:73 char:44
    + ($dropdown | where {$_.innerHTML -eq "1"}). <<<< Selected = $two + CategoryInfo : InvalidOperation: (Selected:String) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound Any assistance would be appreciated. pre $Url = “website” $Url2 = "webstite2" $Username=”user” $Password="password” $Executable = "C:\Program Files (x86)\Internet Explorer" $IE = New-Object -com internetexplorer.application; $IE.visible = $true; $IE.navigate($url); while ($IE.Busy -eq $true) { Start-Sleep -Milliseconds 2000; } $IE.Document.getElementById(“userid”).value = $Username $IE.Document.getElementByID(“ubspwd”).value=$Password while ($IE.Busy -eq $true) { Start-Sleep -Milliseconds 2000; } $Link=$ie.Document.getElementsByTagName("input") | where-object {$_.type -eq "submit"} $; while ($IE.Busy -eq $true) { Start-Sleep -Milliseconds 2000; } $IE.navigate($url2); while ($IE.Busy -eq $true) { Start-Sleep -Milliseconds 2000; } $Link=$ie.Document.getElementsByID("select#SEARCH_WRK_CALLER_TYPE_ID.psdropdownlist") | where-object {$_.type -eq "3"} #$Link=$ie.Document.getElementsByTagName("input") | where-object {$_.type -eq "submit"} #($Link | where {$_.innerHTML -eq "1"}).Selected = $true #| where-object {$_.type -eq "BOMTECH"} #$doc = $ie.document #$listbox = $doc.getelementbyClass("PSDROPDOWNLIST").value = "Branch" #$dropdown = $ie.Document.getElementById("SEARCH_WRK_CALLER_TYPE_ID") #($dropdown | where {$_.innerHTML -eq "1"}).Selected = $true HTml ARC Service Center Alternative Investments BOM & PWM Client Escalation TECH Branch Branch PWM/WA/CC Branch/NRS Br C's Club Choose A Caller Type Client Client/Internal Client/Other Command Center Dis Pilot Branch 7 First Aid GTS IS Managed Desk Managed dept Support Team Municipal Securities Outbound Services Place Holder SG Hotline SG Tech Outage Service Recovery Tech Mgr Esc Tech Telecommuter Technical Other Technical/External Technical/Internal Trt/Branch Tde Support/Client Tre WAC Service Desk White Glove /pre

  • #23642

    Topics: 13
    Replies: 4872
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    PowerShell isn't a good language for messing with the DOM via IE. That's a pretty old COM interface, and it doesn't translate especially well into .NET.

The topic ‘Internet Explorer change drop down menu’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort