1. Parul Bhagat
  2. PowerBuilder
  3. Friday, 13 May 2022 03:53 AM UTC

We are automating Powerbuilder 2019 application using automation tool UFT. But the objects inside a pbdatawindow are getting identified as rows and columns and not as inividual objects like a dropdown or an edit box. We tried using UI Automation as well and that too gave the same results.

Is there a setting or configuration within pb.ini file that can help us expose all the objects inside a datawindow as individual objects to be uniquely identified by the automation tool ? Or is there a configuration to make powerbuilder application compatible to be used for UI Automation and all its objects inside a pbdatawindow are exposed to be used by MSAA (Microsoft Accessibility APIs) for UI Automation in UFT ?

Accepted Answer
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 13 May 2022 06:56 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi.

Some points in case you aren't aware. The following from documentation (UI accessibility and automation support - - What's New (appeon.com)):

MSAA is a legacy technology introduced in Windows 95; it supports the PowerBuilder standard controls well; but it imposes major limitations on the PowerBuilder custom controls such as DataWindows. Starting from PowerBuilder 2019 R3, PowerBuilder supports a newer and more capable technology which overcomes the limitations of MSAA; this new technology called Microsoft UI Automation offers a richer set of properties and extended interfaces to manipulate not only standard controls but also custom controls (such as PowerBuilder DataWindows and child controls in DataWindows).

So, MSAA has limitations when we speak about datawindows. Powerbuilder supports Microsoft UI Automation to "expose" datawindow controls. But: "you will need to set the AccessibleName and AccessibleDescription properties in the controls' Property tab page".

Datawindow styles that are suported are:

  • CrossTab
  • FreeForm
  • Grid
  • Group
  • Label
  • N-Up
  • Tabular
  • TreeView

Supported controls for a datawindow are:

  • Button
  • Computed Field
  • GroupBox
  • Text
  • Column - supported following styles:
    • CheckBox
    • DropDownListBox
    • DropDownDataWindow
    • Edit
    • EditMask
    • RadioButtons

As mentioned, for those controls you will have to set AccessibleName and AccessibleDescription properties.

The main question now: does your automation tool supports Microsoft UI Automation API? If yes, do you have set values to AccessibleName and AccessibleDescription properties for each control you want to be exposed? Also you should set the appropriate AccessibleRole for each control (by default it will always be defaultrole!). Example: a column should have the columnrole! and it's header the columnheaderrole!).

This can be done programmatically. Depending on the way you choose to implement this it may be lot of work...

For the second question about the pb.ini, Accessibility should be enabled by default. But there is a accessibility option setting that can be set to pb.ini. I've seen some options in the following link by Miguel Leeuwe PB.MiguelL.work - List entries. He provides explanation for each possible value. In your case, based on Miguel's work, you should have in you ini:

[Data Window]
Accessibility=1
# or
#Accessibility=2

because you need to have enabled Microsoft UI Automation.

Andreas.

Comment
  1. Parul Bhagat
  2. Friday, 13 May 2022 09:00 AM UTC
Thank you @Andreas Mykonios for the quick resolution. This works for Powerbuilder 2019 R3 but not for 2019 R2
  1. Helpful
  1. John Fauss
  2. Friday, 13 May 2022 13:45 PM UTC
That's is correct. The enhanced Accessibility feature was added to PowerBuilder in 2019 R3. R3 is the Long Term Support release, so if you're going to use PB 2019, I highly recommend you consider using R3.
  1. Helpful
There are no comments made yet.
Parul Bhagat Accepted Answer Pending Moderation
  1. Friday, 13 May 2022 08:58 AM UTC
  2. PowerBuilder
  3. # 1

Thank you @Andreas Mykonios for the quick resolution. This works for Powerbuilder 2019 R3 but not for 2019 R2

Comment
  1. Andreas Mykonios
  2. Friday, 13 May 2022 09:15 AM UTC
You are right. You should upgrade to R3 to use this. I didn't know that you were on R2. R2 is to old now, and there are no patches for it since a long time. R3 is an LTS version. So maybe it's time to upgrade... R3 is pretty stable and introduces a lot of improvements.

Andreas.
  1. Helpful 1
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.