Combobox change value without assignment

Jan 14, 2010 at 9:36 AM

Hi

I have a ComboBox with some values

using the following code =>

 

 ComboBox box =
          _container.Get<ComboBox>(SearchCriteria.ByControlType(ControlType.ComboBox).AndAutomationId(_automationID));

        //TODO why is the value changed
        value = box.SelectedItemText;

in debug mode all is fine

 

during test run the value of the combobox is changed.

but we dont' use some of the set functions

Application Type is WPF

Maybe the problem occours during getting the combobox.

 

I notify that the Get function opens and close the dropdown of the combobox

 

Any ideas?

 

 

Coordinator
Jan 17, 2010 at 1:47 PM

is it selecting some other item in the combobox?

Jan 18, 2010 at 5:57 AM

no

 

I write a class which collect all informations from one part of the gui (all values in textfields, labels, checkboxes, comboboxes and so on.)

 

After that we change some values (not the combobox) and close and reopen the application to be sure that nothing has changed.

If I run in debug mode all is as expected.

 

But in fast test run you can see that during the get function the value changes.

 

Throndorin

 

 

Jan 26, 2010 at 6:41 PM

Maybe it's using a WPFCombobox instead of the usual Combobox? Have you tested it with White Recorder and UI Spy?

Feb 2, 2010 at 8:01 AM

you are right, i will try to use the WPFCombobox