Forum Discussion
Thanks Robert for your reply.
In the NameMapping way of object identification,I can't use descriptive way of accessing the object. I will explain you why I need to have descriptive way of access is that I need to have subroutines which are generic and not tied up with NameMapping.
For Ex: I want to create customized Click Button subroutine,so that I can put some customized code like first checking the object exist or not and then add some reporting code.
In UFT, we used to this way sorry for going back to UFT, where we are aware that that we can access the property using descriptive programming and once we create this, we are not concerned about the object repository or in TestComplete case it is NameMapping.
Sub ClickButton(btName)
If Browser("name:=.*").Page("title:=.*").WebButton("name:"=btName).Exist() Then
Browser("name:=.*").Page("title:=.*").WebButton("name:"=btName).Click
End If
End Sub
In the above code, I need just pass the button name and that's it, this will work on any web page or button, so it is application independent and more useful in organizing subroutines or function.
Regards,
Nimish
Based on your explanation, Does all your objects has unique name or property in-order to use only one parameter make your object to identify? I don't think any AUT has this.
Why we want to go to NameMapping?
- It makes maintenance easy
- It has best functions like Extended Find, Conditional Object Mapping, Using different type of property values which can set thru run time, etc. which reduces your complexity of object mapping.
- Aliases make your name mapping to be uch understandable and easy to update.
- TestComplete making good enhancements on NameMapping which increases our code to execute effortless
I know, Since you are from UFT background you want to accomplish your requirements in UFT way in TestComplete which makes you lot of confusions and questions.
As you are now working with TestComplete[i hope] you may want to spent some time on the TestComplete 's powerful modules like Project Variables, NameMapping and lot of in-built functions which increases os Automation code more descriptive.