Established Member.

How to interact with objects inside of a SWT_Window0?

Hello everyone,

I have been having an issue where i need to automate the interaction with objects inside of a SWT_Window0. Within this Window I have a list of objects which need to be clicked and dragged to another part of the screen. I have attached a picture of the SWT_Window0.


The aim I have is to click on "Crosstab" and drag it to the right handside of the screen. The issue I have is UFT only recognises the entire window as one object and does not recognise anything inside it, Crosstab, Spreedsheet etc. And because of this I am having great difficultly getting UFT to click on the "Crosstab" label. Could anyone with more UFT experience potentially share some ideas about how to go about clicking the labels within the SWT_Window0?

I've tried a couple of different ways of trying to click any label within the SWT_Window0 but with no luck. Closest I can get is just using UFT's record which gives:

Window("Designer").WinObject("SWT_Window0").Click 64,34

But i cannot use this is I do not want to use X,Y coordinates in my test as they are not reliable  

"Window("Designer").WinObject("SWT_Window0").Click" Just clicks middle of the window.

I've also tried other things like   .Click 2,   .Click "Crosstab",   .Press "Crosstab" etc but of no avail

I will also attach the properties of the SWT_Window0

"Class Name:=WinObject",
"attached text:=",
"object class:=SWT_Window0",
"window id:=0",



2 Replies
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..



Have you tried the insight recording or the UI Automation feature.



Established Member.

Hi thanks for the reply.

I've tried insight recording but it did not work. My company uses UFT 12.00 and it does not have the UIAutomation support.

Little update on the issue. While on my pc when i use Object spy on the list of objects it comes up as a WinObject with nativeclass:= SWT_Window. When i did Object spy on the same thing on my Coworkers computer, when hovering over the list of objects it actually comes up in Object spy as a "WinListView", but when you go to click anywhere on the list of Objects while Object Spy is still on (just to save the properties of the Object in Object spy), all the properties change back to what i see them as on my computer, Changes from WInListView to WinObject. Which is really weird. After finding this out I realised it should be Identifying as a WinlistView and not as a WinObject. Any ideas about what to do or opinions about the situation? I've tried adding in and removing all different Addins, Reinstalling JRE, tried using functions that work for WInListView on the WinObject but to of no avail.



The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.