Tag Archives: PowerBuilder

Java SWT apps official support


Even though we added support of Java SWT application months ago, in 0.8.0 Preview 5 or even earlier, we’ve never declared this fact. There’s a script within UIAutomation 0.8.5 packages that installs Java Access Bridge libraries by Oracle accordingly to this page: Installing Java Access Bridge.

All that you need to do is

  1. download the binaries (see inside the script)
  2. change a couple of variables to meet paths to Java on your host
  3. save and run the script As Administrator

Here are screenshots which abilities Oracle/Sun adds to our tools (Eclipse Indigo):

JavaSWTsupport001 JavaSWTsupport002 JavaSWTsupport003 JavaSWTsupport004 JavaSWTsupport005 JavaSWTsupport006 JavaSWTsupport007 JavaSWTsupport008

JavaSWTsupport002

JavaSWTsupport003

JavaSWTsupport004

JavaSWTsupport005

JavaSWTsupport006

JavaSWTsupport007

JavaSWTsupport008

 

UIAutomation and PowerBuilder 12.5


Many years ago, in 1999-2000, I used to use PowerBuilder. At first, it was 5.2 (a pretty buggy and unstable version as I remember), later I used 7.0. Even in these times, PowerBuilder has been collapsing. Delphi, Visual Basic, Crystal Reports, many newcomers struggled for that tasteful market, visual access to databases.

After, I tried 8.0. These times I thought that, as the majority of successful and lucrative start-ups, PowerBuilder was bought for the purpose to obtain its customers only, not the application itself.

I almost forgot this fun application, with the running man for start, pebbles for source code (sometimes source files behaved strangely. Joke? Nope, source files are not mere text files here. They are specific files for numerous platforms, therefore they could be broken, huh). DataWindows, source code editors with pink band for inherited code, etc, etc, … The old good app.

Recently, I saw a question in a LinkedIn group: “Any recommendations on a UI Automation tool, preferably open source or free, that works with PowerBuilder 12.0 and/or 12.5”.

I was surprised by the fact that somebody still needs testing against PowerBuilder, decided that SAP gave it the second life and downloaded 12.5.

My first impression was that PowerBuilder shipped in two editions: .NET and classic. I glanced at the .NET edition, got that it produced WPF applications and lost the interest.

The classic edition, on the opposite, took me. With nostalgia and disgust at all these fun but unfriendly menu and toolbars, I started testing all that I found. I discovered that I almost completely forgot how to build a window (the start-up script), attach a menu to it, attach a data window to it, etc, so that I turned to tutorials and samples. I could not run the tutorial because I forgot the password to the sample SQL Anywhere DB, and I opened samples.

1. Advanced GUI

Having started the sample,

PB125_00001

PB125_00002

this app appeared.

PB125_00003

To my shock, it was too advanced: no accessibility is provided. While I could work by names with the tutorial app, Sybase left only AutomaitonId and ClasName for testers. Awful!

To open the Help/About window, testers need to run the following abracadabra:

Get-UIAWindow -Name advanced*gui* | Get-UIAMenuItem -AutomationId 'item 2' | Invoke-UIAMenuItemExpand | Get-UIAMenuItem -AutomationId 'item 10002' | Invoke-UIAMenuItemClick;

The old-school tab control and toolbars are Panes.
The grid is accessible, but, but…
This code gets the topmost field in the grid and turns John into Johnny:

Get-UIAWindow -Name advanced*gui* | Get-UIAText -Name first_name_t | Invoke-UIAControlClick; Get-UIAControlFromPoint | Set-UIAControlText -Text Johnny;

PB125_00005

The rest of grid fields share the same name, what is even worse.

The second tab is better: names of control are available to testers.

PB125_00006

Get-UIARadioButton -Name Horizontal | Invoke-UIARadioButtonSelectItem -ItemName Horizontal;

PB125_00007

Other three tabs were not better: the most of the controls are Panes.
I checked other samples, some could be automated, some are problematical.

%d bloggers like this: