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

7 posts, 1 answers
  1. Stanislav
    Stanislav avatar
    1 posts
    Member since:
    May 2012

    Posted 15 Jul 2012 Link to this post

    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
  2. Answer
    Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 16 Jul 2012 Link to this post

    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
  3. Abc
    Abc avatar
    5 posts
    Member since:
    Aug 2014

    Posted 19 Sep 2014 Link to this post

    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
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 24 Sep 2014 Link to this post

    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
     
  5. Jürgen
    Jürgen avatar
    4 posts
    Member since:
    Apr 2014

    Posted 10 Jun 2015 Link to this post

    Hello Telerik,

    I m facing the same issue as Mamta did. It doesn't select a value at all. The framework version I'm using is 2015.1.319.0.

    My workaround is using the .Net Automation Api directly as proposed in

    http://stackoverflow.com/questions/5814779/selecting-combobox-item-using-ui-automation.

    Do you intend to fix this issue?

    Regards

    Jürgen

  6. Jürgen
    Jürgen avatar
    4 posts
    Member since:
    Apr 2014

    Posted 10 Jun 2015 Link to this post

    Hello Telerik,

    I' m facing the same issue as Mamta did.

    When are you going to fix this bug?

    Regards

    Jürgen

  7. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 12 Jun 2015 Link to this post

    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
     
Back to Top