DenisMedvedev
10 years agoContributor
How to get NameMapping object with This or Self keywords?
Precondition:
I have bellow elements ODT.Class ElementActions with code
function SetValue(obj, text){ obj.Keys(text + "[Enter]") }
And ODT.Data.Application.CustomerName element it has type of ElementActions class, so I can use SetValue method
Also it has method GetObject with code
function CustomeTextField(){ return NameMapping.Sys.Orders.OrderForm.Group.Customer }
My test:
function start (){
ODT.Data.Application.OrderScreen.CustomerName.SetValue(ODT.Data.Application.OrderScreen.CustomerName.GetObject(), "Text") }
Here will be useful to get object without repeating
ODT.Data.Application.OrderScreen.CustomerName.GetObject()
code in signature, so my question is How can we do it?
I read some article about This or Self keywords, but I’m not sure that it can help me to deal with it (https://support.smartbear.com/viewarticle/72522/)