Forum Discussion

gaudgaur's avatar
14 years ago

How to tackle with cursor change event

I am evaluating Testcomplete 8 for testing my TMDS application.


Following are some issues I am facing:


 

1. While recording in my application at a particular point in time cursor of the screen changes.


For instance I have selected one option say “Postion Train” , so when I select this option my cursor changes

from normal cursor to "Position train cursor" (Cursor with position suffix).


When I replay my script it fails to run the moment my cursor has changed.


 

Is there any work around for this issue?






Following is the log of error occured: 

An error occurred while calling the "Click" method or property of the "Track" object.

The object or one of its parent objects does not exist.


Tested Object














Alias: Aliases.TMDS.frmMainMDI.MdiClient.frmDisplay2.Track
Mapping item: NameMapping.Sys.TMDS.frmMainMDI.MdiClient.frmDisplay2.Track


Missing Object














Alias: Aliases.TMDS.frmMainMDI.MdiClient.frmDisplay2.Track
Mapping item: NameMapping.Sys.TMDS.frmMainMDI.MdiClient.frmDisplay2.Track


1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    The problem is more likely that the object "Track" is not accessible to the scripts at that time.  What you might want to do is check the mapping of the object, first, and make sure it is being accurately mapped to identify the Track object uniquely.



    If that checks out, you might want to use a "WaitAliasChild" call to get your "Track" object before you call the click method.  Something like



    var TrackObj = Aliases.TMDS.frmMainMDI.MdiClient.frmDisplay2.WaitAliasChild("Track", 10000)

    if (TrackObj.Exists) then 

        TrackObj,Click()

    else Log.Warning("Track object does not exist")