ObjectNotFoundException is quite common exception that Rational Functional Tester [RFT] throws when it is not able to find the objects
It is also quite self explanatory , clearly indicating that the object being looked for was not found.
Why the object was not found could have multiple reasons like -
The object is actually not there.
The object is there but somehow the hierarchy of the object has changed and this will make the object inaccessible.
The object is there but some recognition properties have changed
Object Found with insufficient recognition property matches (this may also result in AmbigiousException and may be fixed using update properties wizard )
Sometime one may also encounter the ObjectNotFoundException and futher details are it was found with Incorrect state.
Especially for the Html Domain one may see , object being looked for was found with incorrect state [LOADED] or [LOADING] where as RFT was looking for the object with state [READY].
By default RFT expects the browser to be in a READY state and then performs any action but sometime the browser stays in the state of [LOADING] or [LOADED] , and in these cases during playback , RFT would throw ObjectNotFoundException - found with incorrect state [LOADING ] or [LOADED] .. (either one of them]
If this is the reason for a script failure one can take following corrective measures -
You can modify the method that gives the object for eg:
button_googleSearchsubmit().click(); //Default , the STATE IS expected to be READY
button_googleSearchsubmit(ANY,LOADED).click(); //would expect the state to LOADED
button_googleSearchsubmit(ANY,LOADING).click();//expects the state to be LOADING
button_googleSearchsubmit(ANY,NO_FLAGS).click();//would ignore the state.
If the state remains LOADED and we don't want to modify the scripts which is usually the case then we can add this flag to ivory.properties file
If the state is let's say LOADING all time time for an application then following flag can be added
X = 4 for LOADED
X=8 for LOADING
for eg: rational.test.ft.html.browserreadystate=8
would direct RFT to perform the action if the browser state is LOADING
ivory.properties file resides (default installation on Windows 32 bit) C:\Program Files\IBM\SDP\FunctionalTester\bin
Changes made to ivory.properties require , RFT and any enabled applications (like browsers ) to be closed.