Forum Discussion

hmacpherson's avatar
hmacpherson
Occasional Contributor
11 years ago

Is there a way to do a global Search/Replace within a test parameter?

I've got a test parameter thatcontains client ID of 1278. I'd like to change that to a client ID of 1290.  I can do a search within the Workplace that pulls up about 50 instances where the parameter needs to be changed.  When I try to do a "replace", TestComplete tells me it "Cannot replace text in the Current Document or Panel".



Is there a way around this?
  • These are keyword tests? It's a bit unsavory sounding :) but you could do a search/replace across the relevant keyword tests files using Notepad++ or the like. They're just text files.

6 Replies

  • hmacpherson's avatar
    hmacpherson
    Occasional Contributor
    They are keyword tests. I have a parameter that I've set that I'd like to change using the 'Search/Replace" in the Edit menu.



    It will do a global search/replace within the Worspace, but it will not pick up parameters. If I switch to the "Organize Tests" viiew where I really use and exercise those paramters, the Search will work and it can pull up the instances where I have a parameter that needs to be changed, but it cannot "Replace."



    So, does anyone know how to globally search/replace within parameters?
    • daniel_dewinter's avatar
      daniel_dewinter
      Contributor

      Hi,

       

      I have the same problem trying to find and replace text in paramaters.

       

      Finding them isn't the problem, but somehow the text cannot be replaced. Pretty annoying.

       

      Did find an solution to this issue?

       

      Thanks,

      Daniel

      • joseph_michaud's avatar
        joseph_michaud
        Moderator

        This thread is a bit old.  Tried it with TestComplete 12 and it seems to work.  Which version are you using?

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3
    I haven't found a way to do that or to have it replace within an object name either.  I hope someone posts one!
  • maximojo's avatar
    maximojo
    Frequent Contributor
    These are keyword tests? It's a bit unsavory sounding :) but you could do a search/replace across the relevant keyword tests files using Notepad++ or the like. They're just text files.