shizufree
Newbie
Reged: 06/04/09
Posts: 4
|
|
Im working with dynamic objects at the moment and my problem is that RFT 'sometimes' seems to recognize two identities of only one object(for example a link or image). Im sure that there is only one Browser open and that there is only one identity of this object but RFT finds sometimes two.
As a result, RFT throws an 'AmbiguousRecognitionException' wich looks like this:
Found 2 instances of the same test object. This often happens when multiple instances of the application are running. Details: Looking for TestObject(Map: ...). First object: recognition score:0, ... Second object: recognition score:0, ...
First and second objects are identical.
After trying to highlight this object he asks me if he should show the first 2 found items and then he marks 2 times the same object. After this procedure rft works correctly and find only one object. My script throws no Exceptions anymore and the highlight functions shows just one object.
But like i said, sometimes rft gets crazy and finds 2 objects instead of one.
Here is a topic i found in this forum discussing the same problem.. maybe someone found a solution for that.
http://www.sqaforums.com/showflat.php?Ca...true#Post384533
In my opinion it could be:
- Java version of Browser - TestObject to = image_closePage(ANY, NO_STATE); ANY, NO_STATE should be different. I dont undestand those parameters. - maybe because i didnt unregister()
Edited by shizufree (06/04/09 04:58 AM)
|
dougstewart
Junior Member
Reged: 06/09/03
Posts: 9
|
|
I had posted the thread you refer to. That was back 2 years ago. We were using version 6 at the time. The way I got around the problem was to rollback the latest update (I think it was iFix002). If you are using a version later than 6, I don't know how to help you. We are having many other problems with version 8.
|
shizufree
Newbie
Reged: 06/04/09
Posts: 4
|
|
Im using version 8.0 at the moment.
|
shizufree
Newbie
Reged: 06/04/09
Posts: 4
|
|
For all that had or have the same problem... thus problem was fixed in 8.0.0.3.
|
Neeraja_Induri
Newbie
Reged: 07/12/10
Posts: 4
|
|
Hi , I face a similar problem .Can you please tell me how you were able to resolve this .
|
Sathish804
Member
Reged: 07/17/09
Posts: 163
Loc: Hyderabad,INDIA
|
|
Hi Neeraja,
can you post the Error what you are getting?? and Whre exactly you are getting this error??
-------------------- Thanks and Regards
Sathish
|
Neeraja_Induri
Newbie
Reged: 07/12/10
Posts: 4
|
|
Hi Sathish, My requirements is i am doing a search.The search result returns me many data , and therefore pagination is there .I wanted to display the product names.First page i display my result .To go to next pages , i use the next button which i captured and put in a loop to retrieve all the products in all the pages .Please find the code .
ProductSearch.list =search("Html.DIV","catalogListing",".text"); while(image_next().ensureObjectIsVisible()){ image_next().click(); ProductSearch.list=search ("Html.DIV","catalogListing",".text"); System.out.println("ProductSearch.list.size*************"+ ProductSearch.list.size()); } Basically i get error at image_next() , says multiple objects found for the same test object .
Thanks Neeraja
|
Sathish804
Member
Reged: 07/17/09
Posts: 163
Loc: Hyderabad,INDIA
|
|
Hi Neeraja,
When ever you are navigating to the next page it is encountering 2 or more next buttons for which it has same properties.For this situation try to identify the Next button with find method and verify how many buttons you are getting. If you are getting more than 1 button then try to get the .bounds propery or visible area of the Next button which returns the Rectangle.Then from that value verify which next button has height and width not zero,that next button is your required object.
Code:
TestObject[] to = use find method to get the Next button objects. GuiTestObject next = null;
for(int i=0;i<to.lenght;i++){
java.awt.Rectangle rec = null; rec = (java.awt.Rectangle)to[i].getProperty(".bounds");
if(rec.height > 0 && rec.width > 0){ next = new GuiTestObject(to[i]); break; }
}
//Now click the Next button.
if(next != null){ next.click(); }
Hope this helps you!!!!
-------------------- Thanks and Regards
Sathish
|
Neeraja_Induri
Newbie
Reged: 07/12/10
Posts: 4
|
|
Thanks Sathish .I tried adding a property for the required next button and updated the object recognition properties and it did work .
Please let me know when do we use .bounds property .
Thanks Neeraja
|
Sathish804
Member
Reged: 07/17/09
Posts: 163
Loc: Hyderabad,INDIA
|
|
Hi Neeraja,
we uses .bounds property when we want to identify whether an object is Visible on the screen or not.It returns the Rectangle from the screen we verify the Height and width of the object to verivy its visibility.
-------------------- Thanks and Regards
Sathish
|