Forum Discussion

joffre's avatar
joffre
Regular Contributor
13 years ago

Web Testing on version 7.52 and 8.60

I was having trouble by testing our software on version 7.52 so I've decided to download the newest version and give it a try.



Here is the 7.52 code:



Set IE = Aliases.iexplore

Set FPWeb = IE.pageFpwebFolhaDePagamento

Sub CAD_Empresa

    Call IE.ToURL(http://localhost/fpweb/FrameMDI.aspx)

    'Click no Menu Tabelas

    Call FPWeb.frameFrame1.formForm1.panelBarra32.panelMenuCache10.textnodeTabelas.Click()

    'Click no SubMenu Tabelas Básicas

    Call IE.pageHttpLocalhostFpwebBarraprinc.panelOuterBorder.panelInnerBorder.panelScrollContainer.table.cellTabelasBSicas.Click() 

    'Click no SubMenu Empresas

    Call IE.pageHttpLocalhostFpwebBarraprinc1.panelOuterBorder.panelInnerBorder.panelScrollContainer.table.cellEmpresas.Click()

    'Click em Novo

    FPWeb.frameFrame2.formForm1.table.cell.submitbuttonNovo.Click

    'Informo o Nome da Empresa

    FPWeb.frameFrame2.formForm1.panelPnlcodigo.panel.textboxTxtdescemp.Text = "NOME DA EMPRESA"

    'Informo o Nome de Fantasia

    FPWeb.frameFrame2.formForm1.panelPnledicao.panel.textboxTxtnomefant.Text = "NOME DE FANTASIA"

    'Informo o Num CAGED

    FPWeb.frameFrame2.formForm1.panelPnledicao.panel.textboxTxtnumcaged.Text = "100"

    'Informo a Qtde de Funcionários

    FPWeb.frameFrame2.formForm1.panelPnledicao.panel.textboxTxtnumfunc.Text = "100"

    'Seleciono a opção Tabelas Próprias

    Call FPWeb.frameFrame2.formForm1.panelPnledicao.panel.checkboxChkindtabproprias.ClickChecked(True)

    'Seleciono a opção Tabela de Salário

    Call FPWeb.frameFrame2.formForm1.panelPnledicao.panel.checkboxChkindtabsalario.ClickChecked(True)

    'Click em Salvar

    FPWeb.frameFrame2.formForm1.table.cell.submitbuttonSalva.Click

End Sub




Here is the 8.60 code:

Set IE = Aliases.iexplore

Set FPWeb = IE.pageFpwebFolhaDePagamento

Sub CAD_Empresa

    Call IE.ToUrl(http://localhost/fpweb/FrameMDI.aspx)

    'Click no Menu Tabelas

    Call FPWeb.frameFrame1.formForm1.panelBarra32.panelMenuCache10.textnodeTabelas.Click()

    'Click no SubMenu Tabelas Básicas

    Call IE.pagepopup0.panelOuterBorder.panelInnerBorder.panelScrollContainer.table.cellTabelasBSicas.Click()

    'Click no SubMenu Empresas

    Call IE.pagepopup1.panelOuterBorder.panelInnerBorder.panelScrollContainer.table.cellEmpresas.Click()

    'Click em Novo

    FPWeb.frameFrame2.formForm1.table.cell.submitbuttonNovo.Click

    'Informo o Nome da Empresa

    Call FPWeb.frameFrame2.formForm1.panelPnlcodigo.panel.textboxTxtdescemp.SetText("NOME DA EMPRESA")

    'Informo o Nome de Fantasia

    Call FPWeb.frameFrame2.formForm1.panelPnledicao.panel.textboxTxtnomefant.SetText("NOME DE FANTASIA")

    'Informo o Num CAGED

    Call FPWeb.frameFrame2.formForm1.panelPnledicao.panel.textboxTxtnumcaged.SetText("100")

    'Informo a Qtde de Funcionários

    Call FPWeb.frameFrame2.formForm1.panelPnledicao.panel.textboxTxtnumfunc.SetText("100")

    'Seleciono a opção Tabelas Próprias

    Call FPWeb.frameFrame2.formForm1.panelPnledicao.panel.checkboxChkindtabproprias.ClickChecked(True)

    'Seleciono a opção Tabela de Salário

    Call FPWeb.frameFrame2.formForm1.panelPnledicao.panel.checkboxChkindtabsalario.ClickChecked(True)

    'Click em Salvar

    FPWeb.frameFrame2.formForm1.table.cell.submitbuttonSalva.Click

End Sub




Note that they are almost the same. The 7.52 code stop working on second line, when it tries to do the following command:

cellTabelasBSicas.Click()




Is it a problem with the older version or I'm doing something wrong?



I did the same things on both versions.

10 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    It would be helpful if you describe what error messages, etc, you're getting when it halts.  That will help determine what's going on.
  • joffre's avatar
    joffre
    Regular Contributor
    It would be helpful if you describe what error messages, etc, you're getting when it halts.  That will help determine what's going on




    Robert, TestComplete just don't recognize the object that was recorded before. I've attached an image to make it better for you to understand..



    Remembering that on TC 8.60 I did the same thing, recorded the same actions and it runned perfectly.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    My guess is that either you're not waiting enough time for the component to resolve before clicking on it or the mapping of the component in NameMapping in 7.52 is not mapped properly.



    Object not found errors are usually one of these two.



    What's the text in Additional Information in 7.52 when it fails to work?
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Then the problem is either in timing (your 7.52 code/environment is not set up to wait long enough for the object to resolve) or in your mapping (your criteria mapping the component is unsuccessful in finding the component).



    Why does 8.6 work?  Probably because, when you did your recording in 8.6, different criteria are used in the mapping and, potentially, the auto-wait timeout setting is set differently so it waits longer.



    Hopefully this gives you some direction in where to look for how to correct your 7.52 project.
  • joffre's avatar
    joffre
    Regular Contributor
    Both are with default configuration. I just recorded and runned.



    But TestComplete 8 records it with some diferences on NameMapping. My guess is that TestComplete 8.60 is just better than 7.52 on Web platform. This is possible, right?
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    It's possible, but I cannot say for sure.  There have been improvements in NameMapping in TC 8 over TC 7 so there may be some more reliable abilities.



    In any case, the fact that TC 8 has different criteria over TC 7 when automatically doing the mapping explains why TC 8 works and TC 7 doesn't.  I'd bet that if you applied the same mapping criteria in your TC 7.52 scripts that they would work as well.
  • joffre's avatar
    joffre
    Regular Contributor
    I'd bet that if you applied the same mapping criteria in your TC 7.52 scripts that they would work as well.




    Which configurations do I have to change to make my TC 7.52 works?