Powershell..select drop down menu from web page

前端 未结 2 1219
别那么骄傲
别那么骄傲 2021-01-14 14:56

im trying to select a drop down menu on a website but im completely lost on how to do so. i googled the hell out of it but no luck on finding anything. this is what im tryin

2条回答
  •  佛祖请我去吃肉
    2021-01-14 15:17

    Try this:

    # will select item with label 9
    $dropdown = $ie.Document.getElementById("skuAndSize")
    ($dropdown | where {$_.innerHTML -eq "9"}).Selected = $true
    

提交回复
热议问题