Forum Discussion

MW_Didata's avatar
MW_Didata
Regular Contributor
2 years ago

Mass update keyword test actions

We are currently upgrading our software to .Net 6, with this update action clickbutton no longer exists.

 

Is there a way to update all my clickbutton actions to click?

Doing this manually will take too long, I'm hoping there is a way to automate all clickbutton actions to become Click or at least something similar

 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I don't think it can be done in TestComplete. However, you can perform a search and replace on the keyword test file, providing parameters are the same.

     

    Note, since you're modifying the file outside of TestComplete, it's at your own risk!

    • MW_Didata's avatar
      MW_Didata
      Regular Contributor

      I was looking at that, but click has parameters while clickbutton does not.

      Click uses coordinates and shift y/n.

      Clickbutton always presses the center I think

       

    • MW_Didata's avatar
      MW_Didata
      Regular Contributor

      Click uses the parameters, so I would need to add it right?

      I hope there is another way to do this, editing all these actions with notepad seems a little risky

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Search and replace may not be an easy option then!

     

    You will have to work out the differences between Click and ClickButton, to see if it is possible to do. Otherwise, the only option is to manually update the actions within TestComplete.

  • MW_Didata's avatar
    MW_Didata
    Regular Contributor

    I'll make a feature request to use clickbutton with component one for .net core.

     

    Changing "Clickbutton" to "Click" does work, it clicks deadcenter on the button.

    The parameters are not copied over so I wonder what that will do for stability