Forum Discussion

sastowe's avatar
sastowe
Super Contributor
12 years ago

object recognition behavior I have never seen before

I have a weird problem with scripts that have been running great for a long time. I am running TC 8.2. I have a line of script




 

set frmDrive = Sys.Process("diihl7ml").WaitVBObject("frmDrive", STD_WAIT)



On the next line I attempt to click something on that frmDrive. I receive an object not found error. When I examine the form object in pobject spy, I seem



Sys.Process("diihl7ml").Window("ThunderRT6FormDC", xxxx Caption Obfuscated", 1)



I can see that instead of being a VBOIbject like it should be, it is reporting as a window.



Where in my very large project suite this occurs seems completely random.  If I were to reboot the machine, it might happen again somewhere else.



Has anyone seen this before? Help please.



Thanks



PS. I cannot move to TC 9 at this time as I am working with support to fix some bugs. I tell you that lest you suggest that to fix the issue.

3 Replies

  • I am having a very similar problem to this as well.  Let me explain my story...



    I started off with TC 7.5.  Wrote quite a bunch of scripts.  Things worked well.  I then upgraded to TC 9.20.2460.7.  The test machine I'm on is a Win 7 32bit SP1.  I then ran the test script I have and then it came across the same sort of problem that this Post mentions.  It complains about it can't find certain properties anymore.  I did some further investigation and found some very odd behavior.  



    Before executing the test in TC9, it can properly identify the objects properties.  Life is good.  However, once i execute the test script, it then recognizes the object differently, causing the script to not work.  Annoying...



    I start TC9 and I load up my program I'm going to test.  I use the Object Spy and highlight a form it is tripping up on.  Before running the test, things are OK.  I go to the Object Browser to get a better picture of things.  I highlight the item 'VBObject("frmReportSelect"), and it properly displays the attributes and properties that are available to me.  There is the set of Standard, Extended and Visual Basic properties.  Looks like everything is working properly at this point...  (See attached image)



    I then execute a test script.  I put in a breakpoint in the script to demostrate the problem, at the point where it brings up the 'frmReportSelect' form.  Then I use the Object Spy again on this form, and then take it back to the Object Browser to see the whole thing again.  But now things have changed.  Where the item used to be called 'VBObject("frmReportSelect"), it is now called 'Window("ThunderRT6FormDC", "Report Expert", 1).  And the looking at the attributies and properties of this item, it has lost the whole Visual Basic category.  None of those properties are available to me any longer.  This causes the script to no longer work  (See attached image)



    what is going on here.
  • sastowe's avatar
    sastowe
    Super Contributor
    A little light reading. This is BAFFLING as it formerly worked.



    If you run a simple VB executable (EXE), you will notice that several different hidden windows are running within the same process as your EXE. These hidden windows are VBBubbleRT6, OleMainThreadWndClass 0x########, VBMsoStdCompMgr, ThunderRT6Main, OleDdeWndClass 0x########, and VBFocusRT6.



    This from an article on subclassing. Means little to me. But I cannot understand why for some of my windows and all the objects south of them shows as a window of this class. There is nothing hidden about it.



    I did not change anything about my project or app under test, test environment...





  • sastowe's avatar
    sastowe
    Super Contributor
    I am an idiot. I changed the process filter. The form in question runs in a different process than my main app. It is not in the tested apps list. Therefore the objects are not found.