Sanity Check Needed: Issue using Select. Possibly wrong Element ID/Xpath/CSS Selector
Hello. When I go to select a value from a dropdown menu I keep getting an error saying that the WebElement doesn't have the attribute to use select_by_value(). I have been trying to stick with using the element ID but I also experimented with CSS selector and XPath. With the CSS Selector/Xpath I was able to find a valid element but I still end up with the same error message. I am trying to select the value in the dropdown for Hulu's Account creation page for example let's say the birthday month (https://signup.hulu.com/account). My eventual goal is to be able to manipulate the birthday day/year and gender dropdowns but once I get a sanity check on one of them, I should be able to figure out the other inputs. I found the ID for the listbox for the month is birthdayMonth-menu. Could someone please help me with either getting the correct ID/Xpath or CSS Selector?
Posted Aug 27, 2021, 3:44 AM UTC
Because the drop down is not actually a
select.Click the box, wait for the popup, click the item in the popup. In this case it seems to be stored in a UL.
Sites and toolkits deciding they need to re-invent the
selectwheel is a real bane of an automator's existence, and yet, it's become annoyingly common.Seriously. Now you have to click the dd element, wait for the drop down to expand and all options to be displayed and then click on an option. With select, it’s just one line of code.