Forum Discussion

mindy's avatar
10 years ago

Automating Java Web Apps

I have not automated a Java web app before. I am using vbscript in test complete to complete this task.

Two questions here:

1. In general, Is it best to use the name mapping or the full name?

2. I notice both the name mapping and full name have changing values like within the tables and cells. How to I make my script reusable so that if the value changes, it will still find the same cell each time?



Example code below. The "table" value changes based on the previous selection I pick in the script. Is there someway to set it as a variable in the script, then use it to click on it? How do I accomplish this?


Page.Panel("centerLayoutUnit").Panel("centerCenterLayoutUnit").Panel(0).Form("centerPane").Panel("searchPanel").Panel("selectFromTab").Panel("selectFromTab_content").Table(1).Cell(0, 1).Table("colRefPickList").Cell(0, 0).Table(26).Cell(0, 0)


1 Reply

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Melinda,

     


    >>1. In general, Is it best to use the name mapping or the full name?


    It depends on your skills and background. Some TC users prefer using NameMapping and the Alias tree. 


     


    As for handling dynamic objects (whose identification parameters are changed from run to run), watch this video - it shows TestComplete's NameMapping features that you can use to create a reliable test.