cancel
Showing results for 
Search instead for 
Did you mean: 

Script works, setting breakpoint complains about unable to find the object

SOLVED
Highlighted
Occasional Contributor

Script works, setting breakpoint complains about unable to find the object

When I execute the script without a breakpoint, the script completes successfully. However, if I set a breakpoint after the flex/flash log in screen, click on locals in debug to view the variables, nothing happens and after a while I get 'Unable to find the object that match the "userLoginPanel" item' popup wizard. When I click on the popup cancel or retry buttons, TC is unresponsive for a long time and I have to kill it.

If I don't click on locals to view the variables, I can step through the code.

 

TC version 12.10.602 running in windows 10 hyper-v. I'm using firefox version 60.1 with flash 29.

 

I have verified that righ click>Show in Object Browser from Aliases tree works.

 

Thanks for the support,

Fred

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Script works, setting breakpoint complains about unable to find the object

Hi,

 

It is my understanding that Locals pane implements a kind of 'lazy evaluation' in order to speed things up.

I.e., when test script stops on a breakpoint with Locals pane visible, TestComplete starts evaluation of all local variables to get their values. If a variable references some UI element, TestComplete tries to get a reference to it and, if the object does not exist, then TestComplete tries to re-evaluate it (via search through the UI objects hierarchy, which is time consuming, but this is your case).

I would recommend to not keep Locals pane visible unless you need it and hide it (switch to some other pane) before resuming script execution.

 

Regards,
  /Alex [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.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: Script works, setting breakpoint complains about unable to find the object

I suggest you contact Support directly with your question.  Here's the link:

https://support.smartbear.com/message/?prod=TestComplete

Highlighted
Community Hero

Re: Script works, setting breakpoint complains about unable to find the object

Hi,

 

It is my understanding that Locals pane implements a kind of 'lazy evaluation' in order to speed things up.

I.e., when test script stops on a breakpoint with Locals pane visible, TestComplete starts evaluation of all local variables to get their values. If a variable references some UI element, TestComplete tries to get a reference to it and, if the object does not exist, then TestComplete tries to re-evaluate it (via search through the UI objects hierarchy, which is time consuming, but this is your case).

I would recommend to not keep Locals pane visible unless you need it and hide it (switch to some other pane) before resuming script execution.

 

Regards,
  /Alex [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.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

Highlighted
Occasional Contributor

Re: Script works, setting breakpoint complains about unable to find the object

Just have to use the old style of debugging -- print statements. 😞

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!
Top Kudoed Authors