Valued Contributor.
Valued Contributor.

So, what do you do when UFT cannot identify and object?

OK, I've used all the unique property values of an WebElement found through ObjectSpy, I even threw in (manually added) and Index value.

Here is my Code:

Set MyBrowser = Browser("Micclass:=Browser","CreaTionTime:=0").Page("Title:=.*")

MyBrowser =WebElement("Class:=WebElement","HtmlTag:=FIGCAPTION","InnerText:=Auto""Index:=0").Click

And I'm getting the following error messege:

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

Line (8): "MyBrowser =WebElement("Class:=WebElement","HtmlTag:=FIGCAPTION","InnerText:=Auto", "Index:=0").Click".

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.

So, I ran the script through 'Maintenance Mode,' and UFT commeneted out mline 8 and produced the followiing  code:  MyBrowser =Browser("AllState").Page("Auto Insurance Quotes").Link("Auto").Click 

And,  the script ran successfully!

The question here is : ObjectSpy spied the proprty as "WebElement' and I used accordingly, AND  'Oparetion' is 'Click'


UFT idenfied the object as 'Link' with 'Click' operation!

Would anybody please tell me the difference and  reason(s) for failure?

Thank for reading.


1 Reply
Knowledge Partner
Knowledge Partner

You code at the top is syntactically incorrect, you are creating a Browse/Page object and then trying to redefine it with a Click method.

When I spy the object I see its class as WebList, this works for me:

Browser("micClass:=Browser").Page("micClass:=Page").WebList("html id:=state").Select "FL"

Mark Smith.


The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.