This is a migrated thread and some comments may be shown as answers.

Issue. Impossible to select any value from the WPF ComboBox until clicks on it firstly

5 Answers 246 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stanislav
Top achievements
Rank 1
Stanislav asked on 15 Jul 2012, 07:09 AM
Hello Telerik,

I would like to inform you about the following issue that was found during my work with Free Testing Framework.

There is no possibility to select any value from the ComboBox until clicks on it firstly.

public static void SelectItemByText(this ComboBox comboBox, string itemValue)
{
    comboBox.User.Click();
    comboBox.SelectItemByText(true, itemValue);
}

Kind Regards,
Stanislav Hordiyenko

5 Answers, 1 is accepted

Sort by
0
Accepted
Anthony
Telerik team
answered on 16 Jul 2012, 02:26 PM
Hello Stanislav,

This is expected behavior if the underlying Visual Tree is not populated with the ComboBox Items until it is opened. Most Silverlight and WPF applications act this way.

You should be able to use a single line of code by passing an additional argument to open the drop-down before selecting by text:

//comboBox.User.Click();
comboBox.SelectItemByText(true, itemValue, true);


All the best,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Abc
Top achievements
Rank 1
answered on 19 Sep 2014, 09:58 AM
Hello Telerik,

I am automating WPF window App, comboBox.SelectItemByText(true, itemValue, true); only clicks on the dropdown and shows value for a second but it doesn't select the value that i have mentioned in itemValue.
I tried using by text as well as by index but it doesn't work.
Please suggest as i need urgent help on this.

Thanks in advance,
Mamta
0
Boyan Boev
Telerik team
answered on 24 Sep 2014, 07:27 AM
Hello Mamta,

What do you mean by "it doesn't work"? Does it select a wrong item or it doesn't select a value at all?

Can you provide me with short video demonstration of what exactly you are doing?
You can use Jing screen capture software for your demonstration.

You can send us also the trace log.

Give us more detailed information about your scenario.

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Jürgen
Top achievements
Rank 1
answered on 10 Jun 2015, 01:05 PM

Hello Telerik,

I' m facing the same issue as Mamta did.

When are you going to fix this bug?

Regards

Jürgen

0
Boyan Boev
Telerik team
answered on 12 Jun 2015, 08:36 AM
Hi Jurgen,

I am sorry to hear you are experiencing this issue.

Could you please give us the same information as I asked Mamta:


What do you mean by "it doesn't work"? Does it select a wrong item or it doesn't select a value at all?

Can you provide me with short video demonstration of what exactly you are doing?
You can use Jing screen capture software for your demonstration.

You can send us also the trace log.

Give us more detailed information about your scenario.

Also what version of Testing Framework do you use?

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Stanislav
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Abc
Top achievements
Rank 1
Boyan Boev
Telerik team
Jürgen
Top achievements
Rank 1
Share this question
or