2

In RFT 8.1.0, is there a way to know the recognition score of an object programmatically?

Sometimes when performing an action like html_button().click() you get a warning that the object isn't perfectly recognized, but the action gets done correctly.

I would like to "order" some GuiTestObjects by their recognition score while the script is running, and perform the click action on the most relevant one (the one with the lower score).

Alessandro Da Rugna
  • 4,571
  • 20
  • 40
  • 64

1 Answers1

1

If you open Object Map and select "Update Recognition Property" by slec then it would show you the wizard that would show what properties match against what do not match. Also the scoring not only takes into account recognition properties ofhe current object but rather a commulative recognition score of parent ojects as well.

Prakash
  • 742
  • 7
  • 19
  • Thanks @Prakash, I edited the question because I wasn't clear enough. I want to get that recognition score in the code while the test is running, something like `html_button1().getRecognitionScore();` but I see no such method or anything similar. – Alessandro Da Rugna Oct 12 '12 at 06:50
  • Yeah the scoring is done internally by checking what property matches and what not and then adding up the scores .. there is no API available as far as I know that can be used to know what is the recognition score. – Prakash Oct 17 '12 at 09:47
  • Ok, I'll dig into RFT to see where it reads the score... when the logWarning is done, the score is logged so I think it can be read somehow. – Alessandro Da Rugna Oct 19 '12 at 12:42