Create objects to be mapped from scratch with property or Xpath as an option
The ability to create a mapped object from scratch is something that I feel would be useful and make Testcomplete a more powerful (useful?) tool. This would also help promote the "shift left" methodology that some companies are trying to move towards.
Scenario1: Product owners has a new product with mock-ups. Developer and automation engineer come up with naming conventions for the pages and elements before development is started. Automation engineer can't start his work until he's got a working application in front of him to then map all the pages and elements. If everything in "Mapped Objects" could be created from scratch, all this work could be completed when the application is completed and ready for testing.
Scenario2: I'm particular on how I want objects named and mapped. I'm mapping some pages and objects of an existing application that does not have automation. Using DOM explorer I can quickly find page titles, ID tags, name, classes, etc. Having the ability to create objects from scratch cuts down on my time of "Map Object from screen", drag to object, select properties manually, rename, add/ remove properties.....wash rinse repeat as many times as you have to.
Scenario3: When trying to map an object from the page, you can't tell Testcomplete at what level you want to map at. Say I want to map a table, but TC can't give me just the table when I drag the object spy to the table, so I have to map a cell and then work my way backwards. I can use the DOM explorer and see the table has an ID, but I can't just create a new object and specify the properties for it in TC. I either have to map the cell and work backwards or navigate the Object Browser and drill down to the table to map it that way.
Let's say for adding a new page with 2 buttons, right click on Sys > Add Browser > specify property + condition + value (or select from dropdown) + name of page (pageMyApp). Right click on pageMyApp > Add New Object > specify (or select from dropdown) the ObjectType and different properties I want (ObjectType = Button + idStr = searchButton). Then repeat previous process but this time select xpath and specify your xpath "//*[id='login']" for the 2nd button.
The ability to add objects from scratch was a very useful feature that was available in our legacy automation tool, but unfortunately that company no longer supports the tool.
Yes, I do know that you can copy and paste within the namemapping file. This is what I have been doing and will continue doing, unless this can get implemented. However, copy+paste is finicky and still requires tweaking and checking that TC finds the object as it has left over properties from the object you just copied from, but it's all we got right now.
I'm really surprised no one has ever requested this as I used this all of the time in our old tool. I did see a similar request someone sent in 3 years ago, but it was about creating blank aliases which is not what I am asking.
This functionality is almost there with copy and paste in namemapping. Instead of copying an object and moving it to where I want it in the namemapping and then changing the properties manually, just give us the option to create a new object and provide the properties or xpath for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.