Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Script | how to get object of some open window just using its class type,Java
#2
Not Solved
Hi,

I am not sure if your first piece of code works either without Object Repository having all the objects with the specific labels you are collecting.

Rather you should have set the object :
Code:
Set buttonDesc = Description.Create()
buttonDesc("Class Name").Value = "JavaButton"

Set reqButton = JavaWindow("AKAM Application").ChildObjects(buttonDesc)
text = reqButton(0).GetROProperty("label") ' the index starts with 0 for the identified objects
If label = "[i]something you are searching for[/i] then
   reqButton(0).click
End If

And coming to your second point, you can very well get your java window, provided its open and you know what are the properties to identify it uniquely. I being unknown to Java add-in would suggest to identify properties such that your window is identified uniquely in two cases
1. When only one java window is open
2. When number of java windows are open
If you didn't get any count at msgbox WinChildren.count, it obviously means that the property is not enough to locate the java windows.

Let me know if this helps

Cheers
Reply


Messages In This Thread
RE: QTP Script | how to get object of some open window just using its class type,Java - by anil2u - 08-07-2013, 01:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  DP Encapsulation Within Class Object TheGlovner 2 1,793 10-12-2018, 02:11 PM
Last Post: TheGlovner
Question Is there a way to create dynamic objects by declaring the type of object as parameter lotos 3 2,202 11-08-2017, 11:15 PM
Last Post: lotos
  Object doesn't support this property or method: 'window(...).window(...).winobject' senthil5683 1 3,689 07-04-2016, 07:08 PM
Last Post: venkatesh9032
  Dynamic obj rep - get text in the class (html) marcio cravo moreira 0 2,127 05-26-2015, 06:58 PM
Last Post: marcio cravo moreira
  webfile web object not identified at runtime in a java application saila123 1 2,821 02-11-2015, 08:23 PM
Last Post: Kirill

Forum Jump:


Users browsing this thread: 2 Guest(s)