TestProject Forum

I Completed a test recording and parameter setting, duplicated it, and move the copied one to another folder, changed it...after that, I found the original one changed also

I Completed a test recording and parameter setting, duplicated it, and move the copied one to another folder, changed it…after that, I found the original one changed also.
The original one can’t past the test, so I have to change back the original one.
I don’t know if the duplicated one will change after I change the original one.

Is the duplicate test always changed together?

Hello @hanswhang
What did you change in your copy test?
If you edit the element - name or the list of locators it will also change in the original one also, because the elements remain constant, if you have made a change the change will be made to the element wherever it is in your tests.
The elements are a separate part and can be managed through the Elements tab.


Each app has a folder where you save all the data used for your tests.

If this is the case, you can create a new element and use it instead of the existing element so as not to modify your existing test.



Let me know if it helped you

Yes you are correct, I changed the elements.
Because our web application is dynamic and some of the pages are the same elements with different elements name. I duplicated the test and change the elements id in the locators so the test procedure will work for another page (with some revision of course).
If I create a new element each time, it’s also lots of work to do.
Can I duplicate a element or save a element to another name ?

@hanswhang
You can duplicate elements in the element tab


image

You can also parameterize your locators

If you use data-driven testing with parameters and add all the XPath values in a CSV file, You will be able to use one test to test your two environments.

Using data drive testing with multiple different environments is a simple way to change values in parameters.

Once you create the test you can download the data source template and put all the URLs there:

then upload to the Data Sources:

You can use it both in the tests and in jobs as well.

You can see here video how to do that as well:

I hope this information helped you :slight_smile:

Thank you for your detailed explanation, it really help !

1 Like