Ask a Question

PB12 - How to work with combobox/dropdown/panel(combobox)

SOLVED
escap89
Contributor

PB12 - How to work with combobox/dropdown/panel(combobox)

Hi,
I have read alot of sites but didnt found any solution 😕 how to solve these problems:

 


Problem number 1(attachemnts with "p1"):

I have a object ComboBox("rodzaj") that have properties like wItem,wItemCount,wSelectedItem but still its not posibble to select any item from the list. If i read wSelectedItem property it always giving "-1" in ouput even if i change selected item.

Refresh() not helps - looks like TC "remember" selected as default value.

 

ComboBox=ParentWindow.ComboBox("rodzaj")
ComboBox.Refresh()
Log.Message(ComboBox.wSelectedItem)#Always "-1"

 If i try:

    Log.Message(ComboBox.wItem(1))

I get that error:

TypeError 'IDispatchIndexedPropertyWrapper' object is not callable


Problem nr 2(attachemnts with "p2"):

In this case our "combobox" is a panel and I have no clue how to choose a specific value from it.


Problem nr 3(attachemnts with "p3"):

In this case we have to work with dropdown object, I have no clue how to choose a specific value from it.

 

Actually in every case I am using "down" keys but as we know its weak solution.

I already seen that: https://support.smartbear.com/viewarticle/72444/

 

I would be very grateful for your help

 

23 REPLIES 23

Is your ComboBox variable of type Object?


Marsha_R
[Community Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Do attachment answers your question?

No.  🙂      Let me try again.

 

Here you have set a variable named ComboBox to the mapped object: 

 

ComboBox=NameMapping.Sys.Process("wpius").Form("SAWA - Wydział Pracy i Ubezpieczeń dla I instancji V Wydział Pracy i Ubezpieczeń Społecznych, Wersja: 2.16.5.0 (MS SQL)").Panel("Workspace").MDIWindow("Repertorium P").Window("pbdw120", "", 12).ComboBox("rodzaj")

 

Then you use that variable to try to set the index:


ComboBox.set_SelectedIndex(2)

 

When you define the variable ComboBox, is it of type Object or Integer or String or ???


Marsha_R
[Community Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Ohh

 

I dont define "ComboBox" variable before cause i dont have to in python.

 

 

But even if do that operation wtihout variable, like:

Sys.Process("wpius").Form("SAWA - Wydział Pracy i Ubezpieczeń dla I instancji V Wydział Pracy i Ubezpieczeń Społecznych, Wersja: 2.16.5.0 (MS SQL)").Panel("Workspace").MDIWindow("Repertorium P").Window("pbdw120", "", 12).ComboBox("rodzaj").set_SelectedIndex(2)

Im still having the same error. So its not the problem.

Okay.

 

If you go back to Object Spy but look at Methods instead of Properties, is there anything about setting the index in there?  Could I see a screenshot?


Marsha_R
[Community Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Sure:)

Something is not right here?

 

That combobox has pretty much no available methods? According to MSDN, it should have loads!

 

https://msdn.microsoft.com/en-us/library/system.windows.forms.combobox_methods(v=vs.110).aspx

 

Something to do with MSAA settings? I don't have any applications that use these controls so I'm guessing ...

Well that explains why nothing has worked!  I don't know how to fix it either.  😞

 

@AlexKaras can you help?


Marsha_R
[Community Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

I have:

Microsoft Active Accessibility Support plugin is installed in TestComplete (<TestComplete>\Bin\Extensions\tcOpenApps2.pls).

 

If i check "Work with MSAA objects in mode compatible with TestComplete 6 and earlier " in project properties object then object name looks like that:

Sys.Process("wpius").Window("FNWND3120", "SAWA - Wydział Pracy i Ubezpieczeń dla I instancji V Wydział Pracy i Ubezpieczeń Społecznych, Wersja: 2.16.5.0 (MS SQL)", 1).Window("MDIClient", "", 1).Window("FNWND3120", "Repertorium P", 1).Window("pbdw120", "", 12).MSAAObject("client").MSAAObject("combo_box_rodzaj")

i tried

select(1,2) on it -test didnt fail but do nothing.

 

Btw i see two paths in object browser to the same object:

....Window("pbdw120", "", 12).MSAAObject("client").MSAAObject("combo_box_rodzaj")

and

Window("pbdw120", "", 12).MSAAObject("combo_box_rodzaj")

 

 

compatible level option dosent matter prolly but i am still trying.

 

 

OS:

Windows Server 2008 R2 64bit

 

 

 

Hi,

 

Unfortunately, I am not of much help here as I never worked with PowerBuilder applications.

I tried with Access several years ago and MSAA worked fine for its native controls. Taking that all requirements from https://support.smartbear.com/viewarticle/72444/ have been met and ComboBox("rodzaj") is the only control that has this problem, I would talk to developers and ask them if this is a regular PowerBuilder control or some custom one.

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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. Posts made by [Community Heroes]
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.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: