cancel
Showing results for 
Search instead for 
Did you mean: 

DropDown object don't have ClickItem method.

Occasional Contributor

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

Tags (1)
17 REPLIES 17
Highlighted
New Contributor

Re: DropDown object don't have ClickItem method.

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.

Occasional Contributor

Re: DropDown object don't have ClickItem method.

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?

Community Manager

Re: DropDown object don't have ClickItem method.

Hi @mleko,

 

I recommend that you start with the following article - it contains the specifics of testing of PowerBuilder's applications:

https://support.smartbear.com/testcomplete/docs/app-testing/desktop/power-builder/classic.html

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Join the September Hub-bub to show off, learn and win
Occasional Contributor

Re: DropDown object don't have ClickItem method.

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

Best regards.

Community Hero

Re: DropDown object don't have ClickItem method.

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.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Occasional Contributor

Re: DropDown object don't have ClickItem method.

Yes I have configured the PB.  Check the screens, maybe they could help.

Community Hero

Re: DropDown object don't have ClickItem method.

Hi,

 

> 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 :

> wndFNWND3126.MDIClient.wndFNWND3126.panelNone.dropdownProductId2.Click();
> wndFNWND3126.MDIClient.wndFNWND3126.panelNone.dropdownProductId2.FindChild(2).Click();
> 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

Aliases.glas30.wndFNWND3126.MDIClient.wndFNWND3126.panelNone.dropdownProductId

tree node, while the opened table of values corresponds to just

Aliases.glas30.panel

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).

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Contributor

Re: DropDown object don't have ClickItem method.

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.

Occasional Contributor

Re: DropDown object don't have ClickItem method.

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 Smiley Happy

New Here?
Join us and watch the welcome video:
SeptemberNews
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win