Forum Discussion
I may be missing something here, but you say:
"In this scenario I already have located an element in the DOM and passed this element to a variable"
But in your code, your search for the dropdown elements is against:
DropdownOptions = Aliases.browser.WebApp.FindChild(propNames,propValues,2,True)
Where is "WebApp" coming from? I don't see it being passed into your function anywhere? Unless you have scoped it globally and assign it elsewhere? (Messy!) If "PropertyNameId" is your top level object, then you only seem to be using that to actually open the dropdown (assuming "openDropdown(PropertyNameId)" is another function which does exactly that?) that reference doesn't seem to be used in the search within the elements.
You are only telling it to search two layers deep within "WebApp" (whatever it is) so maybe it's finding the wrong top level element on the page (may be hidden?) so never finds the values you want? (And this may happen inconsistently depending on the state of other parts of the site at any given time I guess?)