I'm trying to set dropdowns on this page:
The first dropdown and the fourth dropdown are very similar (brands and country). This is the code I'm using for getting the brand (oem) and country:
oem = Select(wd.find_element_by_css_selector("#alBrandsList"))
oem.select_by_visible_text("Acer")
countries = Select(wd.find_element_by_css_selector("#alCountriesList"))
countries.select_by_visible_text("Albania")
The dropdown is technically hidden, but it somehow seems to work for the device/oem dropdown. For the countries dropdown it is saying that the content isn't visible (which it is). Here's the HTML code it's pulling from:
<select class="pretty-dropdown" datatosent="brand" id="alBrandsList" name="alBrandsList" selectorid="alPhoneModelsList" target="/AdvanceLookup/GetPhoneModels/" style="display: none;">
...
</select>
<button type="button" class="ui-multiselect ui-widget ui-state-default ui-corner-all" aria-haspopup="true" style="width: 232px;">
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
<span>Please select brand(s)</span>
</button>
<select class="pretty-dropdown" datatosent="country" id="alCountriesList" name="alCountriesList" selectorid="alCarriersList" target="/AdvanceLookup/GetCarriers/" style="display: none;">
...
</select>
<button type="button" class="ui-multiselect ui-widget ui-state-default ui-corner-all" aria-haspopup="true" style="width: 232px;">
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
<span>Please select country</span>
</button>
Any idea why it works on the first one but not the second one?