ComboBox items empty

Dec 2, 2009 at 3:34 PM

Hi. I'm working on a WinForm UI and was trying to test it with White. I have a problem because my combo's have items but White can't see them, so I have to select them using keyboard commands.

The combo's datasources are List<T> but I don't know if this is the problem.

Does anybody has a clue?

Thanks

Coordinator
Dec 9, 2009 at 11:51 AM

can you do a LogStructure on comboBox and send the output

Dec 11, 2009 at 6:55 PM

 

Hi. Here is the output, Thanks

 

 

[2009-12-11 17:45:43,834][INFO ] AutomationId: cbBanco
ControlType: ControlType.ComboBox
Name: 
HelpText: 
Bounding rectangle: 453;297;197;21
ClassName: WindowsForms10.COMBOBOX.app.0.33c0d9d
IsOffScreen: False
FrameworkId: WinForm
ProcessId: 3840
System.Windows.Automation.ValuePattern
    AutomationId: 
    ControlType: ControlType.Text
    Name: 
    HelpText: 
    Bounding rectangle: 456;300;175;15
    ClassName: 
    IsOffScreen: False
    FrameworkId: 
    ProcessId: 3840
    AutomationId: 
    ControlType: ControlType.Button
    Name: Open
    HelpText: 
    Bounding rectangle: 632;299;16;17
    ClassName: 
    IsOffScreen: False
    FrameworkId: 
    ProcessId: 3840
    System.Windows.Automation.InvokePattern

[2009-12-11 17:45:43,834][INFO ] AutomationId: cbBanco

ControlType: ControlType.ComboBox

Name: 

HelpText: 

Bounding rectangle: 453;297;197;21

ClassName: WindowsForms10.COMBOBOX.app.0.33c0d9d

IsOffScreen: False

FrameworkId: WinForm

ProcessId: 3840

 

System.Windows.Automation.ValuePattern

 

    AutomationId: 

    ControlType: ControlType.Text

    Name: 

    HelpText: 

    Bounding rectangle: 456;300;175;15

    ClassName: 

    IsOffScreen: False

    FrameworkId: 

    ProcessId: 3840

 

 

    AutomationId: 

    ControlType: ControlType.Button

    Name: Open

    HelpText: 

    Bounding rectangle: 632;299;16;17

    ClassName: 

    IsOffScreen: False

    FrameworkId: 

    ProcessId: 3840

 

    System.Windows.Automation.InvokePattern

 

Coordinator
Dec 12, 2009 at 6:51 AM

Thanks, it shows that there is nothing under the combobox. Can you send sample of the production code which you are using to create the combobox. If I can reproduce it then I can have a look at what is special about it.

Dec 14, 2009 at 11:42 AM
Edited Dec 14, 2009 at 12:10 PM

Hi

Sorry to didn't tell you before, but my combo is an inheritance of another combo. Something like

 

class SpecialCombo : MyCombo

class MyCombo : System.Windows.Forms.ComboBox

 

But I have another combo that has the same problem and its type is System.Windows.Forms.ComboBox. I've noticed that the log structure of them are different. 

 

[2009-12-14 10:58:52,823][INFO ] AutomationId: 

ControlType: ControlType.ComboBox

Name: 

HelpText: 

Bounding rectangle: Empty

ClassName: 

IsOffScreen: False

FrameworkId: 

ProcessId: 0

 

System.Windows.Automation.ValuePattern

 

[2009-12-14 10:58:55,291][DEBUG] Vertical scrollbar is not scrollable for parent of WinFormComboBox. AutomationId:, Name:, ControlType:combo box, FrameworkId:

 

And here is an example of the code to load a combo:

            List<TBank> dtoLista = proxy.List();

            this.DataSource = dtoLista;

            this.ValueMember = "Id";

            this.DisplayMember = "Description";

            this.SelectedIndex = -1;

 

But I tried to load it manually (using Add method) and it did't work

 

            List<TBanco> tLista = (List<TBanco>)controle.Listar();
            tLista.Sort(SortLista);
            this.BeginUpdate();
            this.DataSource = tLista;
            this.ValueMember = "Id";
            this.DisplayMember = "Descricao";
            this.SelectedIndex = -1;
            this.EndUpdate();

Thanks

 

Coordinator
Dec 14, 2009 at 7:13 PM

If I try it standalone it might work as there doesn't seem anything special. Can you send a csproj which would reproduce the issue.

Dec 15, 2009 at 12:38 PM

 

Yes.  I put it in rapidshare (http://rapidshare.com/files/321177310/WindowsFormsApplication3.zip.html)

 

Thanks

Coordinator
Dec 25, 2009 at 3:29 AM

I used you application and ran the test, I didn't find any issues.

AutomationId: comboBox1
ControlType: ControlType.ComboBox
Name: 
HelpText: 
Bounding rectangle: 82,101,226,21
ClassName: WindowsForms10.COMBOBOX.app.0.378734a
IsOffScreen: False
FrameworkId: WinForm
ProcessId: 5132

System.Windows.Automation.SelectionPattern
System.Windows.Automation.ValuePattern
System.Windows.Automation.ExpandCollapsePattern

    AutomationId: 1001
    ControlType: ControlType.Edit
    Name: 
    HelpText: 
    Bounding rectangle: 85,104,204,15
    ClassName: Edit
    IsOffScreen: False
    FrameworkId: Win32
    ProcessId: 5132

    System.Windows.Automation.ValuePattern
    System.Windows.Automation.TextPattern

    AutomationId: ListBox
    ControlType: ControlType.List
    Name: 
    HelpText: 
    Bounding rectangle: 82,122,226,80
    ClassName: ComboLBox
    IsOffScreen: True
    FrameworkId: Win32
    ProcessId: 5132

    System.Windows.Automation.SelectionPattern

        AutomationId: 
        ControlType: ControlType.ListItem
        Name: a
        HelpText: 
        Bounding rectangle: 83,123,224,13
        ClassName: 
        IsOffScreen: True
        FrameworkId: Win32
        ProcessId: 5132

        System.Windows.Automation.SelectionItemPattern

        AutomationId: 
        ControlType: ControlType.ListItem
        Name: b
        HelpText: 
        Bounding rectangle: 83,136,224,13
        ClassName: 
        IsOffScreen: True
        FrameworkId: Win32
        ProcessId: 5132

        System.Windows.Automation.SelectionItemPattern

        AutomationId: 
        ControlType: ControlType.ListItem
        Name: c
        HelpText: 
        Bounding rectangle: 83,149,224,13
        ClassName: 
        IsOffScreen: True
        FrameworkId: Win32
        ProcessId: 5132

        System.Windows.Automation.SelectionItemPattern

        AutomationId: 
        ControlType: ControlType.ListItem
        Name: 1
        HelpText: 
        Bounding rectangle: 83,162,224,13
        ClassName: 
        IsOffScreen: True
        FrameworkId: Win32
        ProcessId: 5132

        System.Windows.Automation.SelectionItemPattern

        AutomationId: 
        ControlType: ControlType.ListItem
        Name: 2
        HelpText: 
        Bounding rectangle: 83,175,224,13
        ClassName: 
        IsOffScreen: True
        FrameworkId: Win32
        ProcessId: 5132

        System.Windows.Automation.SelectionItemPattern

        AutomationId: 
        ControlType: ControlType.ListItem
        Name: 3
        HelpText: 
        Bounding rectangle: 83,188,224,13
        ClassName: 
        IsOffScreen: True
        FrameworkId: Win32
        ProcessId: 5132

        System.Windows.Automation.SelectionItemPattern

    AutomationId: DropDown
    ControlType: ControlType.Button
    Name: Drop Down Button
    HelpText: 
    Bounding rectangle: 290,103,16,17
    ClassName: 
    IsOffScreen: False
    FrameworkId: WinForm
    ProcessId: 5132

    System.Windows.Automation.InvokePattern

 

Have you looked here:

http://white.codeplex.com/wikipage?title=Other%20questions&referringTitle=Home

Jan 11, 2010 at 10:20 AM

Hi. Did you use the test project that I sent or do you  made one with NUnit?

I don't know if it makes any difference but I'm using Win XP 64.

>Have you looked here:

>http://white.codeplex.com/wikipage?title=Other%20questions&referringTitle=Home

Yes and I could get DataGrid Items. Until now, the only problematic was ComboBox.

Thanks