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
Solved! Go to Solution.
Consider direct question to Support via the https://support.smartbear.com/message/?prod=TestComplete form.
There are considerable chances that they will provide you with acceptable solution.
I will appreciate it if you update this thread with the result of your communication.
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.
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 :
but it doesn't work also.
Do you have any suggestion?
I recommend that you start with the following article - it contains the specifics of testing of PowerBuilder's applications:
I have read it 10 times, then I have asked for help. I'm afraid that reading it another 20 times, might not help 😉
> 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.
> From what I found, there should be ClickItem method on dropdown object
I checked the help and I am not sure that is is true for PowerBuilder application. Can you provide the source of why do you think so?
> I tried to do something like that :
> but it doesn't work also.
Well... From what I see on the screenshot, I assume that you did not alter Aliases tree and use it as it was created during namemapping.
If my above assumption is correct, then it looks like that the dropdown is not regular Windows dropdown, but a kind of composite control that opens not a list but a table of values.
I think so because the dropdown object corresponds to the
tree node, while the opened table of values corresponds to just
node. I.e. it is direct child of the main application's window. This is often the case for data-bound controls, when the list of possible values is obtained from some data source during runtime and the list of values is created dynamically. Ask your developers if this is the case.
I would suggest the following:
a) Talk to your developers and ask them if they used standard PowerBuilder's dropdown control or tweaked it in some way. If the latter, then maybe they can provide you with some recommendations of how selection from the table of values can be done;
b) Check how the opened table of values is identified in TestComplete's Object Browser. Is it identified as one object without any children or TestComplete can process its internal structure (like on the screenshot provided in the help article referenced by Tanya).
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.
AlexKaras devs told me that the dropdown is standard dynamic pb dropdown.
I have uploaded the screenshot with objects tree, the case is, only the first child of the dropdown is being "visible", the other ones are greyed out I don't know why, even if I manually click and choose for example third child from the list, and it becomes visible on screen, nothing changes. The third child in the object browser is still greyed out, the first one is not.
Best regards 🙂