Ask a Question

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

SOLVED
Marsha_R
Community Hero

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

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
escap89
Contributor

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

Do attachment answers your question?

Marsha_R
Community Hero

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

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
escap89
Contributor

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

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.

Marsha_R
Community Hero

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

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
escap89
Contributor

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

Sure:)

Colin_McCrae
Community Hero

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

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

Marsha_R
Community Hero

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

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
escap89
Contributor

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

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

 

 

 

AlexKaras
Community Hero

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

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: