Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Java List not being identified by QTP
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Ankur,

I am testing Java Application and for the first time I am under such tough situation.Let me explain you the scenario.
The application that I am testing has Java List and I have to run the test for 5 iterations.The properties in the Object Repository are

1. Class Description - list
2. attached text - Available.*

So when QTP runs for the first iteration the list has 4 values and QTP has no problem identifying the Java List. Now second time the List has 2 values and QTP denies to recognise it. I used GetTOProperties and found that for first iteration it uses the object from repository & takes attached text as Available.*" . Next time it takes the attached text as Available - 4". I tried with descriptive programming too but didn't help.

I have been running the same scripts for almost 1.5 yrs and it had no problem and all of sudden from last couple of builds QTP is throwing error "The object can't be identified.....".

I hope i have made myself clear.

Please help me to understand why QTP is not picking the properties from rep...

Waiting for your reply.

Thanks
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi aditi,

It's suprising how the property value is changing in OR. Anyhow, here i can provide one work around i.e. use the SetTOProperty and set the property value to "Available.*" in OR.

Please let me know the status and for any other info.
Thanks,
SUpputuri
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Try adding the object again and make the changes..Does that help ?

Which version of QTP are you using ?? Does this happen on all the machines you execute ?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi

The same code/script is on two different machines. The server/machine where the scripts runs has problem but the machine where i develop my code does not have any problem. The script runs fine on my machine.Also I tried deleting the object and re-adding it. I tries adding different set of But it didn't help. I am using QTP 9.2.

Also for my clarification I added GetTOPorperties in my code. As I already mentioned the attached text in the object repository is Available.*.
So my question is when QTP runs for the first time, I noticed that it takes the two properties to identify the object which is JavaList in our case.

to_class=JavaList
Attached Text = Available.*

The list has 4 items. So should it be taking the attached text as Available - 4 or Available.*. Please clarify.

And next time when it runs the list has just 2 items and QTP is taking three properties to identify it.The properties are:

to_class= JavaList
class description = list
Attached Text = Available - 4

What is the difference in between "to_class" & "class description"? The application that I am testing is Java Application so why it shows the value as list ?

Appreciate your help.

Thanks
Aditi
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Hello QTPKing,

Thanks a lot for your instance reply.

As per your instructions, I added the SetToProperty in my code. The value is already "Available.*" in OR. So with the help of GetTOProperties what I found was it does take the value as Available.* but still when it comes to recognize the object, QTP throws the error "Can't identify the object "List_Available" (of class JavaList).Verify that this object's properties match an object currently displayed in your application."

And the interesting fact is when I try to HIGHLIGHT the object from Object repository, it does show the correct Java list.

I am trying my best to nill down this issue. But any ideas/solutions would be highly appreciated.

Thanks
Aditi
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi aditi,

Please run the "QuickTestProfessional.bat" file located in the "C:\Program Files\Mercury Interactive\QuickTest Professional\bin" and then try again. Let's hope this will solve your issue.
Thanks,
SUpputuri
Reply
#7
Solved: 11 Years, 3 Months, 3 Weeks ago
Yeah Probably it would. Just adding my 2 cents,
Aditi -

I guess the issue is with object refresh. Either the script sync is out or the list is there but QTP is too quick to select before the objects are loaded. The matter of fact that this script had no issues for 1.5 years only rings the bell about performance of the application. If QTPKing's above solution does not resolve the issue, please try this,
After it is done with selecting the javalist with 4 items write the below code,
Code:
wait 2
Javalist().Object.Refreshobject ( or ) JavaList().Refreshobject
javalist().Click
javalist().select "whatever"

Let me know if this helps.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#8
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Basanth/QTPKing

I tried all the solutions provided by both of you. But unfortunately neither of them helped.

Basanth- The code "Javalist().Object.Refreshobject ( or ) JavaList().Refreshobject" didn't work for me for some reason.

But anyways the only final option that was left for me was to un-install QTP and then re-install it. So i did un/re-install and guess what --- It started working...Hurray!!!

Thank you very much for your kind & prompt reply.

Regards,
Aditi
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to record JAVA Swing application with JAVA add-in Mrudula Chinchanikar 0 998 11-24-2021, 07:18 PM
Last Post: Mrudula Chinchanikar
Exclamation Oracle Objects not identified by UFT 12.02 Deepnara 0 2,227 08-21-2017, 05:32 PM
Last Post: Deepnara
  Verifying the contents of a Web List in QTP scipt ritugoyal 4 47,473 10-07-2016, 12:23 AM
Last Post: Vijay Kumar
  WebElement (only Weblist) is not getting identified in QTP 11, Windows 7 priyaang 3 5,927 06-26-2015, 12:39 AM
Last Post: supputuri
  java objects not getting identified with java update 8 in uft 11.5 milukuraju 0 2,952 02-06-2015, 12:04 AM
Last Post: milukuraju

Forum Jump:


Users browsing this thread: 2 Guest(s)