Hi ,in my application have some pages look likes a table but when spy its shown as JavaObject(””website”).How i will get data from object?
Question ID: 105121
2
0

Its seems like a table, its have column name also, and few link are presented. But when spy it taken as a JavaObject.While Recording, suppouse we trying to click any link presented in the object its generate statement like Java Object("website").click 230,245.
And these positions are dynamic.

How i will handle this situation??

Marked as spam
Posted by (Questions: 3, Answers: 2)
Asked on September 13, 2013 2:09 pm
66 views
Answers (4)
1
Private answer

The following is from KM198479, if you have an HP login you can access this document from here: [http://support.openview.hp.com/selfsolve/document/KM198479][1]. I hope this helps:

**The user's application contains some controls that look and behave like familiar controls, such as trees, tables, or buttons. However, QuickTest Professional (QTP) recognizes these objects as JavaObjects, not as their expected object types.
Example: The application contains some controls that look and behave like a JTree or JTable control. QuickTest Professional (QTP) recognizes these objects as JavaObjects, not as JavaTree and JavaTable objects as expected.**

**Diagnosis: The problem controls are customized controls that are derived from a standard class, such as a Panel (java.awt.Panel), that QuickTest Professional identifies as a JavaObject. For QuickTest Professional to recognize a customized control as the type of control it is, it needs to be derived from that class or an equivalent class. For example, to recognize a customized table as a JavaTable, it must be derived from a JTable (java.awt.JTable) or an equivalent Java class.**

**Solution**

**Write custom functions that use the control's properties and methods QuickTest Professional's Java add-in will allow you to access the Java control's own methods and properties. You can use these properties and methods to build your own functions for QuickTest Professional to use.**
**You can use the Object Spy or the ''.object.MethodWizard'' method to see which methods are available for the control.**

**Example: JavaWindow(''SwingSet'').JavaObject(''ToolTipDemo$Cow(st)'').Object.MethodWizard**

**Note: The properties and methods that are available with the .Object property come directly from the control in your application. Because of this, Mercury does not have any information (documentation) on what they do. If you need additional information on these properties and methods, you should consult with your developers.**

**Once you know what methods are needed to perform the desired action, create a custom function that QuickTest Professional can replay.**

Marked as spam
Posted by (Questions: 16, Answers: 807)
Answered on September 13, 2013 2:32 pm
0
Private answer

,Hi Michael... i am having the same issue and by using the .methidwizard i have found the following things -

Javax.swing.JComponent
Java.awt.Container
Java.awt.Component
Java.lang.Object

Now how to proceed further from here ..request you to please guide me with the same.

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on October 4, 2013 6:36 am
0
Private answer

Thanks michael,i will try the same .and let you know the results.

Marked as spam
Posted by (Questions: 3, Answers: 2)
Answered on September 13, 2013 3:25 pm
0
Private answer

i got java methods from Java Object.
can you please suggest me how i can use these methodes for object identification??

Marked as spam
Posted by (Questions: 3, Answers: 2)
Answered on September 26, 2013 1:04 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top