Blocking: Select item from ComboBox not displayed

Apr 14, 2008 at 10:26 AM
On my application, I have a dropdown list which displays 100 items (all servers on the network). I want to select an item which is about 50th in the list.

When I do:

I get the error:
----> Core.UIItems.UIActionException : Could not make the Win32ListItem with AutomationId=<empty> and Name=MyServer visible, after waiting for 5000 ms

I can't see a way around this, I can't see a way to scroll the ComboBox - please help!


Apr 14, 2008 at 10:59 AM

public void SelectAfterScroll()
Assert.AreEqual("7", comboBox.SelectedItem.Text);

This also fails:
----> Core.UIItems.UIActionException : Could not make the Win32ListItem with AutomationId=<empty> and Name=7 visible, after waiting for 50000 ms
Apr 14, 2008 at 5:41 PM
Combobox tries to scroll to the item which you want to select. Do you have any delay in scrolling?
Do you see any scroll happening in your ComboBox? Can you do a ComboBox.LogStructure(), at the time exception happens and send it to me?
Is there a way I can reproduce this issue?
Apr 17, 2008 at 12:30 PM
Edited Apr 17, 2008 at 1:34 PM
I have the same problem. It can be reproduced running the NUnit test "SelectItemHavingLongText()"
I tested this in a previous relese. It worked ok then.


A workarround for me is selecting a lower value. Then selecting the correct value. My items are sorted.
The first selection is visible when the dropdownlist drops down. When then selecting a new item the selected item is in the middle of the dropdownlist. Now the correct value is visible and I can safely select the correct value.
Apr 18, 2008 at 3:01 AM
Since this works for me and everyone else, I am interested in knowing what is different in your environment.
ListControl.ActionPerforming is the one which makes the item visible by scrolling to it. Scrolling in WPF happens through availability of patterns. Since I cannot reproduce it, you would have to debug it for me. On myside, I am planning to put more debug logs here for better resolution in future.