Cannot Select Correct Pulldown Menu OptGroup Option - Help Please

Hello,
I’m cannot get UI.Vision on Chrome to select the correct option from this pulldown. I can select an option fine from the first set of choices, but I need to select an option from the “Update Status” opt group (second set of choices)

This is what the menu looks like:
bcmenu

Here is source code:

            <option data-action="default" value="" selected="1">Choose an action</option>
            <option data-action="print_invoice" value="printMultiOrderInvoices" class="action" title="">
                Print Invoices for Selected                </option>
            <option data-action="print_packing_slip" value="printOrderPackingSlips" class="action" title="">
                Print Packing Slips for Selected                </option>
            <option data-action="send_invoice" value="resendOrderInvoices" class="action" title="">
                Resend Invoices for Selected                </option>
                                <option data-action="capture_funds" value="bulkCapture" class="action" title="">
                    Capture Funds for Selected                    </option>
                            <option data-action="export" value="startExport" class="action" title="">Export Selected</option>
                                <option data-action="archive" value="deleteOrders" class="action" title="">Archive Selected</option>
                                        <option disabled="disabled"></option>
                    <optgroup label="Update Status for Selected to:">
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="1" data-no-translate="" title="">
                                Pending
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="7" data-no-translate="" title="">
                                Awaiting Payment
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="11" data-no-translate="" title="">
                                Awaiting Fulfillment
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="9" data-no-translate="" title="">
                                Awaiting Shipment
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="8" data-no-translate="" title="">
                                Awaiting Pickup
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="3" data-no-translate="" title="">
                                Partially Shipped
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="10" data-no-translate="" title="">
                                Completed
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="2" data-no-translate="" title="">
                                Shipped
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="5" data-no-translate="" title="">
                                Cancelled
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="6" data-no-translate="" title="">
                                Declined
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="4" data-no-translate="" title="">
                                Refunded
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="13" data-no-translate="" title="">
                                Disputed
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="12" data-no-translate="" title="">
                                Manual Verification Required
                            </option>
                                                    <option data-action="change_status" class="action" value="updateMultiOrderStatus" data-status-id="14" data-no-translate="" title="">
                                Partially Refunded
                            </option>
                                                </optgroup>
  • I can click using the full Xpath such as: /html/body/div[1]/div[2]/form/div[1]/div[1]/select/optgroup/option[4] But I can’t figure out how to select that same option. It can’t seem to find/select the option by using value, index or label.
  • If I select the pull down by the id or shorter Xpath, the best I can get is for it to select the first option in the opt group, which is “pending”, but then every index, value, label, etc. I will ONLY go to pending, no matter what the label, index etc. I.E. index=10 will still only select “pending”.
  • I’ve tried using type and send key arrows and i get errors saying that it’s not the correct type of field.
  • I can select the option using Xmodules but I need the macro to run in the background and that is an absolute last resort.
  • Any help is appreciated. Thanks in advance.

Post url of page please

Unfortunately I cannot because the page is behind a login.

It’s impossible to help with without see the page with the select.

Some select can load in multiple times or use ajax or html5 element and can not recognized with standard selenium command (command base of ui vision).

Thank you for your input. Are there any other select parameters other than index and label that I could possibly use to let the select command know what to choose? I do not get an error when I use the click command on the full xpath of the pulldown option. Again I have no issue selecting from the first group of options. It is only the second group of options where it will only select the first option, which is “pending” that I am having the difficulty. For example, if I try to pick “Shipped” or Completed" it will pick “Pending” instead.

It seems possible to do so using selenium web driver, so I would think that it would also work here and perhaps syntax is the issue.
For example, something like this works in selenium:

//select[@id=‘edit-source’]/optgroup[@label=‘SourceGroup1’]/option[@value=‘4’]

as presented here: https://stackoverflow.com/questions/14170713/how-to-get-options-under-a-particular-optgroup-using-selenium-web-driver-for-jav

Does this line work for your specific dropdown with Selenium Webdriver? Or is this from another example?

I’ve tried using type and send key arrows and i get errors saying that it’s not the correct type of field.

What will always work is using XClick and XType, but I understand that a solution with Click and Select would replay faster.