Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..
171 views

Java Application: Click on a disabled JavaStaticText

Hello,

I'm writing automated tests for a Java application and I'm having trouble with one step. At some point, I need to click on a JavaStaticText in order to open a popup. To automate this step, I simply use the following code :

JavaWindow("xxx").JavaStaticText("xxx").Click "5", "5", "LEFT"

Manually, I can click on it without any problems but this step leads to the error "object is disabled". If I look at the properties of the object, I see that enabled = 0. How can I force a click on a JavaStaticText?

Thanks for any help.

 

0 Likes
1 Reply
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Java Application: Click on a disabled JavaStaticText

I found a solution by getting the coordinates of the JavaStaticText and then using DeviceReplay : 

oDr.MouseClick x, y, 0

But there may be a better solution ...

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