WAI-ARIA Drop-Down Menu


#1

I’m having trouble automating a dropdown that is using ARIA. For the life of me I can’t get it to work. Has anyone else run into this type of menu? Using developer tools I was able to find this code after making a selection from the dropdown menu.

<span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="true" tabindex="0" aria-labelledby="select2-ctl00_ContentPlaceHolder1_Profile1_drpUserGroup-container" aria-owns="select2-ctl00_ContentPlaceHolder1_Profile1_drpUserGroup-results" aria-activedescendant="select2-ctl00_ContentPlaceHolder1_Profile1_drpUserGroup-result-g7pn-105249"><span class="select2-selection__rendered" id="select2-ctl00_ContentPlaceHolder1_Profile1_drpUserGroup-container" title="Instructor">Instructor</span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span></span>


#2

Do you have a link to a test page?

I tried with this page and all seems to work. Example:

{
  "Name": "Untitled",
  "CreationDate": "2018-12-13",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/listbox/listbox-collapsible.html",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=exp_button",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "id=exp_elem_Bk",
      "Value": ""
    }
  ]
}

#3

Ulrich, thank you so much for you help. Unfortunately, the drop-down menus on my site are not that simple and completely different from your example. They are Aria, but some how the developers in India have set it up in a completely different way and very confusing.

Anyways, I finally manage to figure it out by using ClickAt() command. Then used xpath to ClickAt() the option in the drop down menu.

Again, thank you for your help. I hope this helps anyone else who ends up having trouble with this type of drop down menu. Cheers!