Ask a Question

Need help with .Find method, and explicitly locating web objects without NameMapping


Need help with .Find method, and explicitly locating web objects without NameMapping

Hello all,

   I am coming from the world of UFT. I am watching a video series on TestComplete. From an example I am trying to use the Find method to click on an object. My test fails with the error Unable to find the object Sys.Browser....

I have been able to use ObjSpy on this open IE browser to get the property and property value I want the script to locate. So I know - or, atleast it seems TC can see the browser since I can spy objects. So why it fails when i run the test is confusing me. here is my code:

 function Test2()
pbi = Sys.Browser("iexplore").Page("").Find("contentText", "Workspaces", 60, True);


Pretty simple. 

Any help w this is appreciated.

Community Hero

Close all your instances of IE (double check it in Task Manager), then open the one you want to test and run your test again.  Let's see if TestComplete is getting confused with too many browsers open.


I think this is actually a timing issue but let's eliminate this first.

[Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.

Yes it is a timing issue and because of that you should not use the method "Find" on the Page object.

Please use the page NativeWebObject.Find instead and it will work every time.

Look at the "NativeWebObject" in the documentation.


Hope that helps


Showing results for 
Search instead for 
Did you mean: