Naming Bugs For ASP.NET Webforms

Hi, to give some background, i work in a small team on a project that was inherited from a previous company.

We are in the (long) process of bring it up to standard while continuing to deliver new features on a weekly release cycle.

Katalon has helped massively as its enabled us to create tests quickly, however we have found a few flaws.

The first relates to the naming of objects/pages.

The project uses and automatically generates the names for web elements, this is the login text box name: “ctl00$ctl00$mainContent$cphContent$txtUserName” and the id: “txtUserName”.

When recording objects they are automatically named. In most cases the label text is appended in front giving “input_Username_ctl00$ctl00$mainC” however we have a good number of forms where the label isn’t picked up - this seems to be because they are in table cells.

1 - Forms in table rows. The label is in the header row in this case.

2 - Drop-down selects. Instead of the label all of the option labels are concatenated - “select_Please SelectKeep Exist” for example.

3 - Some date pickers. “input_(ddmmyyyy)_ctl00ctl00mai” - this is the major issue as most forms will have multiple date fields and they will all get the same name. This ends up meaning only the first recorded element is saved as all the others are seen as duplicates even though their id’s are different.

This issue was discovered while trying to find a work around for 3.

4 - If we rename an object we’ve captured - “input_(ddmmyyyy)_ctl00ctl00mai” to “input_date-to”.

Then we go on the web recorder and click that element, a new object will generate with the original name.

We would expect the renamed object to be found and used for this purpose otherwise there is little point in being able to rename the objects.

There is a similar issue with the naming of folders.

5 - Some of our pages act as dashboards for our users and the data in them is different for everyone.

When the objects from a page are saved to a folder the name reflects the specific user rather than the page. “Page_SiteName UserData” for example instead of “Page_Page Name” - It seems to be using the title to name the page instead of the “page-name.aspx” in the URL.
Since we have other pages that have the same issue, about half of the object repository is made up of 2 repeated pages.

This features the same issue with the web recorder as with 4.

I’ve thought of a possible solution.

Adding a new field for objects that allows us to add a friendly name that defaults to the generated name. At the same time removing/lengthening the character limit on the length of generated names to stop the date picker issue.

Alongside this, if the same friendly name is given to 2 folders prompt to either merge the folders or rename the it.

Thanks for taking the time to read this.

ASP.NET? #metoo. B)

You’ve reached the sketchy limits of the recording toy tool.

You obviously know how things are named and how to get their IDs so why not just build your Test Objects yourself? And in any folder structure you want? Way, way faster than navigating the recorder’s UI quirkery.


we have web forms with dates and we go to object and un-tick where it recognizes using name and ask the object to be recognized using xpath. It has helped us with issues where the objects are named similarly. and another thing you can do is after recording the object. record the second object using object spy and add it to different folder. It does not confuse then while running. but still you need to ensure that the object are recognized using xpath not name.

Also for drop downs where there is a list for example if you re asking user to enter expiry date and year is a drop down , then ensuring it is xpath helps because the list changes for example object captured in 2018 the list will start with 2018 but now if you run it in 2019 the list would have changed to start with 2019 hence taking xpath value to identify the object helps.