Forum Discussion

romrellob's avatar
romrellob
Occasional Contributor
3 years ago

How do you parameterize object locators in TestComplete

I am using data driven test methods.  Some of the links in our web app are titles of works and include the title string in the link locator,  How can I parameterize the locator to use the data string supplied in the excel file for the data loop?  

  • You can use a string variable to build your own link.

    "beginningoflinkgoeshere"+Eval(referencetoexcelgoeshere)+"endoflinkgoeshere"

    then use that variable where you need the link
  • Aurelia's avatar
    Aurelia
    Occasional Visitor

    Add the Find Object operation to your keyword test. Specify the object TestComplete will search for and click Next..Specify the list of object properties to check and the property values for the sought-for object: ..Choose the found object's method to call and click Finish.

     

    skylight paycards

  • romrellob's avatar
    romrellob
    Occasional Contributor

    Both of your replies have been helpful but not the complete answer.  

     

    In the "Edit Name Mapping Item" window, I want to create a selector that will pull a string value from a data source as shown in the attached screenshot.

     

    The highlighted selector works the best but only when the text value matches.

     

    Any suggestions would be helpful.