cancel
Showing results for 
Search instead for 
Did you mean: 

Add Existing Items to Regions - Adding Underscore

SOLVED
Contributor

Add Existing Items to Regions - Adding Underscore

Hey guys,

I'm trying to add regions from one project to another. I'm using the Add New item wizard and I noticed that after I added the image, I noticed that Test Complete added an _png to the image name. Is there a way to add images to Regions without the underscore? It would be tedious to have to remove it with each image added.

 

Screenshot:

kahle_0-1610574685960.png

 

Side note: I'm guessing that Test Complete adds the _png because it converts Region images in png format?

 

Thanks in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Contributor

Re: Add Existing Items to Regions - Adding Underscore

Hello,

 

Its just a matter of inconvenience is all. I have some 60 -100 images to transfer between projects and wanted to check if there is a "smarter not harder" approach to correcting their names.

 

Thanks

View solution in original post

5 REPLIES 5
Community Leader

Re: Add Existing Items to Regions - Adding Underscore

I am not sure if you can control what the file is saved as, but is it such a problem if there's a "_png" on the end?

 

You could write a script to go through your files and region store entries to remove the "_png" from them, if it bothers you that much.


--------------------
QA Systems Architect
Integrated Control Technology
https://www.ict.co/
Community Leader

Re: Add Existing Items to Regions - Adding Underscore

To the surprise there is no direct way it seems to do that.

But you can do below things to quickly change things

1.  Add all the files in the new project

2. Go to {project}\Stores\Regions.tcRegions 
3. Edit the file in any editor (I used notepad++)

4. Search for _png and replace with "" blank space

5. Save the file and TestComplete will ask to refresh and once you do , all the files will have _ underscore removed

 

As the file location will use .png so search and replace will only change the _png from name and caption name field.

Hopefully it will help you to quickly use the same code across without underscore.

Contributor

Re: Add Existing Items to Regions - Adding Underscore

Hello,

 

Its just a matter of inconvenience is all. I have some 60 -100 images to transfer between projects and wanted to check if there is a "smarter not harder" approach to correcting their names.

 

Thanks

View solution in original post

Contributor

Re: Add Existing Items to Regions - Adding Underscore

Hey,

 

Thank you for the suggestion! Quick clarification, when using Notepad++ to edit a file, how do you specify a file?

 

I'm trying to use Notepad++'s Find in Files feature accessed via Search > Find in Files and it only lets me point to a folder. Not a specific file.

 

kahle_0-1611163633298.png

 

Thanks!

 

Community Leader

Re: Add Existing Items to Regions - Adding Underscore

Approach 1 : Directly say File >> Open in Notepad++ and browse the file

anupamchampati_0-1611170532747.png

 

 

Approach 2: Just browse in the Stores folder using Window explorer and Right Click on the File  >> Edit in Notepad++ or directly drag and drop the file into Notepad++

 
 
 

Screenshot 2021-01-21 005337.jpg

 

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors