You can rename the JavaScript file with a new one in the project. This change reflects
in all the test scripts in the project that use the same JavaScript file.
You can also move or delete the JavaScript file in the project.
When you make changes to the JavaScript file that is used in a Web UI test script from the Test
Navigator, the system automatically searches for all references to the JavaScript file in the
project and overwrite the file with the updated one in all the test scripts where the JavaScript
file is called. This feature is useful when you have multiple calls of the same JavaScript file
in a single script.
-
Right-click the JavaScript file in a project in the Test Navigator, and then select
Rename.
-
Enter a new name in the text field of the dialog that opens.
-
Select Update test Assets that reference the renamed resource.
-
Click Preview.
A wizard is displayed with all the references to the JavaScript file in the
project.
-
Unselect the references that should not be updated and unselect Custom
JavaScript change participant if you don't want any changes in the associated
files.
-
Click OK in the Changes to be performed page.
-
Click OK in the Rename Element dialog.
You have renamed the initial JavaScript file with the new JavaScript file in all the test
scripts where it is called.