So, I just started playing with Powershell today, and I've been searching, but I can't find the answer. I'm not sure if I'm even looking in the right place.
I need to use powershell to select the right combination in some dropdowns. One dropdown is a list of companies and the other is a list of services. The services list is populated depending on the company selection.
Using the IE ComObject:
$company = $doc.getElementById("id_companyselection")
$service = $doc.getElementById("id_companyservice")
foreach ($Item in $company) {
if ($Item.text -eq "name_of_company") {
$shippingMethod.value = $Item.value
}
}
Is there a way to force Javascript to register the onchange event? By default the "service" dropdown, so I can't match the text that I have with the value that I need to select. Is there another way to do this that will use the existing value -> text mapping?