The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> IBM/Rational Functional Tester - RobotJ

Pages: 1
shizufree
Newbie


Reged: 06/04/09
Posts: 4
AmbiguousRecognitionException Problem
      #572845 - 06/04/09 04:47 AM

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)


Post Extras: Print Post   Remind Me!   Notify Moderator  
dougstewart
Junior Member


Reged: 06/09/03
Posts: 9
Re: AmbiguousRecognitionException Problem [Re: shizufree]
      #572921 - 06/04/09 07:54 AM

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.

Post Extras: Print Post   Remind Me!   Notify Moderator  
shizufree
Newbie


Reged: 06/04/09
Posts: 4
Re: AmbiguousRecognitionException Problem [Re: dougstewart]
      #573070 - 06/05/09 12:42 AM

Im using version 8.0 at the moment.

Post Extras: Print Post   Remind Me!   Notify Moderator  
shizufree
Newbie


Reged: 06/04/09
Posts: 4
Re: AmbiguousRecognitionException Problem [Re: shizufree]
      #583743 - 08/04/09 01:25 AM

For all that had or have the same problem...
thus problem was fixed in 8.0.0.3.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Neeraja_Induri
Newbie


Reged: 07/12/10
Posts: 4
Re: AmbiguousRecognitionException Problem [Re: shizufree]
      #634213 - 07/12/10 01:29 AM

Hi ,
I face a similar problem .Can you please tell me how you were able to resolve this .


Post Extras: Print Post   Remind Me!   Notify Moderator  
Sathish804
Member


Reged: 07/17/09
Posts: 163
Loc: Hyderabad,INDIA
Re: AmbiguousRecognitionException Problem [Re: Neeraja_Induri]
      #634221 - 07/12/10 02:32 AM

Hi Neeraja,

can you post the Error what you are getting?? and Whre exactly you are getting this error??

--------------------
Thanks and Regards
Sathish


Post Extras: Print Post   Remind Me!   Notify Moderator  
Neeraja_Induri
Newbie


Reged: 07/12/10
Posts: 4
Re: AmbiguousRecognitionException Problem [Re: Sathish804]
      #635041 - 07/16/10 04:03 AM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Sathish804
Member


Reged: 07/17/09
Posts: 163
Loc: Hyderabad,INDIA
Re: AmbiguousRecognitionException Problem [Re: Neeraja_Induri]
      #635186 - 07/18/10 09:50 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Neeraja_Induri
Newbie


Reged: 07/12/10
Posts: 4
Re: AmbiguousRecognitionException Problem [Re: Sathish804]
      #635383 - 07/20/10 12:15 AM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Sathish804
Member


Reged: 07/17/09
Posts: 163
Loc: Hyderabad,INDIA
Re: AmbiguousRecognitionException Problem [Re: Neeraja_Induri]
      #635386 - 07/20/10 12:27 AM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 3 anonymous users are browsing this forum.

Moderator:  AJ, AllenGay 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 1117

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5