Ask a Question

unable to click on a button after Finding it

Occasional Contributor

unable to click on a button after Finding it


I am just trying to click on a button (Search button) that is a swing control. Please see the attached screen shot for its properties.


No matter what i do, TC is unable to find it and reports in logs that "Unable to obtain the item's rectangle."


Please see the screen shot of the error log as well. Following is what i am doing:


PropArray = Array("JavaFullClassName", "AWTComponentAccessibleName", "text")
ValArray = Array("javax.swing.JButton","Search", "Search")


set objClearbutton =  sys.Process("XXX").FindChild(PropArray, ValArray , 10, Refresh) 

Log.Message objClearbutton .Name 'working fine and returning me the name of the object.

Call objClearbutton .ClickButton ' throws error (can't we call the methods of the object like that?)


I would really appreciate your inputs. i want to make use of Find, Findall, find children etc in order to have robust object identification during test runs. Currently i have all the objects in the namemapping and time to time we face issues in object identification during test runs. 

Please pin point me to any source which could give me insight. I see some examples provided but for web. 


I have already tried to get the X,Y cordinates for the button object. Please help.

Community Hero

Is it visible on the screen at the point you took that capture of the object properties?


Exists and Enabled are both true. I don't see the VisibleOnScreen property in that capture though ....


The "Left" property is showing an error about it must be visible to determine it's location, and the log message saying unable to obtain it's rectangle (location?) looks like a similar visiblity problem? (Not worked with these type of controls myself so going solely by your screen captutres)


Does the control offer any sort of "ScrollIntoView" method?

Showing results for 
Search instead for 
Did you mean: