Forum Discussion

mleko's avatar
mleko
Occasional Contributor
6 years ago

DropDown object don't have ClickItem method.

 Hi, i'm trying to test PowerBuilder application but drop downs are not working correctly. From what I found, there should be ClickItem method on dropdown object, but I can't see that method on list. I can click dropdown but then when i'm trying to click on it's object, with dropdown.child.Click(); nothing happens. I tried to map this dropdown to Win32 Controls and Windows/Combo box/ but it did not work, the message was "The selected object does not match the criteria of the "Combo box" group. 
Thank you for all your help. 

PS: I'm using JS

  • teddy_john's avatar
    teddy_john
    New Contributor

    I faced a similar Wndow combo box situation. What worked for me was -

     

    - Lets say the drop down has five values in the following order: Address, City. State, Zip & Country

    - At the time of recording the test case the user might have selected/clicked on 'Address' from the dropdown list, which gets converted as address into the keyword script in TestComplete.

    - Now, edit the test script by replacing 'Address' with the value 1 (since address is the first element in the drop down selection), City with the value 2, Zip with the value 4 etc.

     

    In other words, the criteria iin the combo box is sequential from 1,2,3..n and not necessarily the value/string visible in the UI.

    • mleko's avatar
      mleko
      Occasional Contributor

      Thank you for your reply!
      Unfortunately when I'm trying to record keyword test, it doesn't use specific object, it's just clicking on parent object on x,y position, which are the child object position, but that's not the way i want it to work.

      I tried to do something like that :
      wndFNWND3126.MDIClient.wndFNWND3126.panelNone.dropdownProductId2.Click();
      wndFNWND3126.MDIClient.wndFNWND3126.panelNone.dropdownProductId2.FindChild(2).Click();
      but it doesn't work also.

      Do you have any suggestion?

    • mleko's avatar
      mleko
      Occasional Contributor

      I have read it 10 times, then I have asked for help. I'm afraid that reading it another 20 times, might not help ;) 

      Best regards.

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        > I have read it 10 times

        Does this mean that you also configured your PowerBuilder application according to the article? Can you provide us with screenshots of how problematic dropdown is configured in PowerBuilder, how MSAA is configured in TestComplete and how this dropdown is recognized in TestComplete Object Browser?

         

        >I tried to do something like that [...] but it doesn't work also.

        "doesn't work" - what does this mean? Any message in test log? What did you expect to get as a result of .FindChild(2) call? What is the content of event record in test log for .Click() method call and what is the content of the Extended Info pane? Try to turn on Visualizer for test playback and check if the click was performed at the expected point.

         

  • anupamchampati's avatar
    anupamchampati
    Frequent Contributor

    even I faced same issue after removing (*) from the MSAA list.

     

    Try adding the wndClass object in the MSAA List to get Clickitem working.

     

    I am also looking for exact solution for now I am using Keys method in ComboBox object, as I know the values in the dropdown.

    • mleko's avatar
      mleko
      Occasional Contributor

      I added wndClass as you suggested, but nothing changed. Here you have the screen how my msaa list looks like.

      Best regards :)