Micro Focus QTP (UFT) Forums
Swing Application JavaButton Question - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Swing Application JavaButton Question (/Thread-Swing-Application-JavaButton-Question)



Swing Application JavaButton Question - donnajm - 08-30-2011

Hello,

I have the following after I recorded the Swing Application to get the Objects.

Code:
JavaWindow("Groups").JavaInternalFrame("Security Group : Untitled1").JavaTable("Available Access Grants").SelectRow "#0"
JavaWindow("Groups").JavaInternalFrame("Security Group : Untitled1").JavaButton("CLButton").Click

JavaTable (Available Access Grants) is to the left and it is table with options to select what access grants I want to select and move over to the right JavaTable (Linked Access Grants). Instead of the actual access grant name all I see is SelectRow "#0" and JavaButton (CLButton). Is there a way for it to recognize the name of the access grant, or can I change it to the label name? The first row I selected for #0 is really called "Edit Activities".

I used Object Spy, but it only sees the JavaTable and I am not able to select the access grant to view the objects.

Thanks for your help,
Donna :-)


RE: Swing Application JavaButton Question - Forrest Gump - 08-31-2011

Hi,

Please try this simple procedure and reply whether its worked or not:

1. Open QTP (Assuming all other applications are closed)
2. Open application that you want to test.
3. Now try to record the steps that you mentioned.

Now QTP will be able to identify and record objects in proper manner.


RE: Swing Application JavaButton Question - donnajm - 08-31-2011

That is what I already did - that is from the recording.