Forum Discussion

mohanponn's avatar
14 years ago

MappedNames

Hi

I am trying to use MappedName in the Find function as below




Project.Variables.currentpage.NativeWebObject.Find("MappedName", "Loginbtn")



where Loginbtn has a mapped name in the Name mapping .



When I do this I am geting an error



You are trying to call the "click" method or property of the "item" object that does not exist.



Wanted to know if MappedName can be used in a Find method ?



Thanks

SQAMd


.Variables.currentpage.NativeWebObject.Find("MappedName", "Loginbtn")where Loginbtn has a mapped name in the Name mapping .When I do this I am geting an error You are trying to call the "click" method or property of the "item" object that does not exist.Wanted to know if MappedName can be used in a Find method ?Thanks SQAMd

1 Reply

  • Hi,



    Enclose "Loginbtn" in wildcards like this:

    ...

    obj.Find("MappedName", "*Loginbtn*", 20)

    ...




    Also, use the regular Find (not NativeWebObject.Find) method and specify the search depth (the third parameter).