Forum Discussion
Here's the search and replace in the code editor
https://support.smartbear.com/testcomplete/docs/scripting/code-editor/find-usages.html
You might want to refactor your code to use a variable for the URL so that you can just update it in one place the next time this happens.
Thank you for quick response.
So we have Keyword tests recording not the script based tests. Not sure how di refactor code or script in Keyword testing.
- Marsha_R2 years ago
Champion Level 3
Create a variable that holds the URL that you need. Use that variable in the keyword test instead of the actual URL. If you give me an example of a keyword test where you use the URL, I can show you how to change it.
- Naynab2 years agoOccasional Contributor
Sure so while login we enter our application URL
Old one - https://mingle-cqa-portal.cqa.inforcloudsuite.com/IPMALPHAQA1_AX1
New one - https://mingle-cqa-portal.cqa.inforcloudsuite.com/v2/IPMALPHAQA1_AX1
and we are using it here if below screenshot helps
- Marsha_R2 years ago
Champion Level 3
create a variable called URL and assign it your new value
in your Operation Parameters, for the URL entry, use the three dots at the end of the Value box to choose this variable instead of entering the URL itself
your test will now pull the value from the variable to use as the URL
do this everywhere you use the URL in your tests and you will only ever have to change the variable value in one place and not in every script