| || |
Class Casting in Java
Does anyone know if it's possible to do casting in QTP for a Java class?
I need to do something like this: I need to get all of the values from a JavaTable:
Vector roles = ((RoleAdministrationTableModel)JavaWindow("Retek RSM Administration").JavaTable("Role Administration").Object.getModel()).getRoles()
But when I run this code I get a "Expected ')' " error....I don't see what I'm doing wrong?
Re: Class Casting in Java
Unfortunately, QTP is NOT well integrated with Java and does not do casting. I have had similar issues and had to find ways around them.
Since QTP is in VBScript, it will not do casting.
You will have to figure out a way to get the Java object to return the correct instantiation without casting. Talk to your devel team to see if you can do it.
Sorry for the not-so-good news...