Search code examples
objectvbscriptqtphp-uft

UFT error: Cannot identify the object


I'm using Unified Functional Testing v12.02 (or QTP).

Sometimes while running script i get the below error and sometimes I don't.

Cannot identify the object "..." (of class ...) Verify that this object's properties match an object currently displayed in your application.

Tip: If the objects in your application have changed, the Maintenance Run Mode can help you identify and update your steps and/or the objects in your repository.

I checked OR and the object itself with Spy tool and they have the same properties.

Sometimes I get the same error in other objects, but if I run again the script it works well.

Can someone explain me what might be the problem? Im a little bit confused why sometimes i get these errors and sometimes don't.

I'm testing a simple web application (for training purposes)

Also I'm using the following add-ins: Web, Web-SAPUI5, Visual Basic


Solution

  • Mostly object wont be in the readystate. Check State of the Object using

    Webedit(googlesearch).object.readyState="complete"
    Webedit(googlesearch).object.Load
    Webedit(googlesearch).object.Disabled=False