Forum Discussion

sebastien_scerr's avatar
sebastien_scerr
New Contributor
11 years ago

Why During test recording Object recorded are not correct.

Hi,



I guess an example is more explicit, so : 



When I record a new test my object is recorded as : 

Aliases.javaw.Shell.Composite.Composite.Composite.Composite.Browser.OleFrame.WebSite.ShellEmbedding.ShellDocObjectView.browser.JavaPluginControlWindow.frame0.panel0.canvas12.Shell.CTabFolder.SwtCompositeBrowser.Composite.ProBrowser.OleFrame.WebSite.ShellEmbedding.ShellDocObjectView.browser.pageIndex.framePage.framePagesPersos.table.cell.formSimulationbean.checkboxMultiInclusFmi



Which is not find during replay. And when I get the object manually the object is recorded as :

Aliases.javaw.Shell.Composite.Composite.Composite.Composite.Browser.OleFrame.WebSite.ShellEmbedding.ShellDocObjectView.browser.JavaPluginControlWindow.frame0.panel0.canvas12.Shell.CTabFolder.SwtCompositeBrowser2.Composite.ProBrowser.OleFrame.WebSite.ShellEmbedding.ShellDocObjectView.browser.pageIndex.framePage.framePagesPersos.formSimulationbean.checkboxMultiInclusFmi





















5 Replies

  • Hi Ryo,

    I have just started web testing this year and I very quickly encountered the same problem you have.  This is just he way things work with the programming langauge used by the developers. 



    To solve this problem I just use the Find methods to locate objects on the screen and work with them (See http://support.smartbear.com/viewarticle/62848/).

    This is a much better way of working as the tests created are more robust, less prone to breaking, require less rework and less maintenance.
  • I anderstand But TestCompete is supposed to provide test recording feature that is very attractive for non developers people. So I should de be able to find the right object ...
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    It appears that, in your second instance, something changed in the application.  Note that there is a SwtCompositeBrowser2 which means that, in your second attempt to record, the NameMapping feature could not match your previous mapping to your new mapping.



    You are correct, TestComplete provides interfaces and such that are not necessary for developers, record and playback being one of them.  But even so, record and playback still needs to be supported by consistent object identification.



    What you might want to do is take a look at your NameMapping and see how the SwtCompositeBrowser and SwtCompositeBrowser2 differ when it comes to mapped properties.  That's the first step in figuring out this kind of difference.
  • Hi, 



    Sorry but I don't get how it can change. Because I play the test just after recording. Anyway when I target manually the object. There is no probleme.



    Another example of difference between record and manual target :


    Aliases.javaw.Shell.Composite.Composite.Composite.Composite.Browser.OleFrame.WebSite.ShellEmbedding.ShellDocObjectView.browser.JavaPluginControlWindow.frame0.panel0.canvas12.Shell.CTabFolder.SwtCompositeBrowser.Composite.ProBrowser.OleFrame.WebSite.ShellEmbedding.ShellDocObjectView.browser.pageIndex.framePage.framePagesPersos.formSimulationbean.tableSimulateurclass.checkboxValselection0


    Aliases.javaw.Shell.Composite.Composite.Composite.Composite.Browser.OleFrame.WebSite.ShellEmbedding.ShellDocObjectView.browser.JavaPluginControlWindow.frame0.panel0.canvas12.Shell.CTabFolder.SWTObject("SwtCompositeBrowser", "", 1).SWTObject("Composite", "", 2).SWTObject("ProBrowser", "").SWTObject("OleFrame", "").SWTObject("WebSite", "").Window("Shell Embedding", "", 1).Window("Shell DocObject View", "", 1).Window("Internet Explorer_Server", "", 1).Page("https://dwas01/Site/index.jsp?id=49000291&url=../../checkLoginStd.do&user=DV&authToken=00005FIR-cCi9LpXafN4Vim8JBG:SIV21002&idPart=49000291&profil=ADMIN&domaine=particulier&contexte=part&produit=MTF&containerCtx=p&containerOrg=P&containerEnv=VAL&localPortComm=9980&containerCop=GC,MLT&containerType=FWG&setBoutonRejetSuivant=false&browserid=1396882680463").Frame("page").Frame("pages_persos").Table(0).Cell(1, 1).Form("simulationBean").Table(0).Cell(2, 0).Panel("calqueBen").Table("noir").Cell(1, 0).Checkbox("valSelection0")

  • I am very interested in hearing a resolution for this issue. I too am having issues where I record a script, it plays back fine and then suddenly it no longer recognizes the controls. But if I click on the 'Highlight on Screen' button, it finds the control fine. It has also been entering duplicate control mapping in my NameMapping directory even though nothing has changed since the recording. Is there a better way to make the object mapping generic or force it to recognize the orginal item?