Forum Discussion
smecham
15 years agoNew Contributor
Hello,
I have found when I use the recorder for web testing (both keyword and scripted tests) and then change the url from my www.test.com to www.production.com so that I can run the same test on the production site I must edit my recorded script and remove the ToURL calls that are added each time the web page loads to a new page. If you don't do this and use your new URL to launch your test the first time it encounters one of the ToURL operations it will change back to the original URL.
Also another suggestion you should include iexplore.exe in your testedApps and set up a variable for the URL you are using to test using a ToURL opperation to go to the web page after launching the testedApp iexplore.exe. This way you can set up a new Test Item and pass in the variable for your URL. This way you can have 2 different test items one with the first URL and another with the second URL that can be ran with out having to change your testedApps.
You will still want to use a wild card in your NameMapping so TestComplete can see the objects on the tested pages.
Attached you will find a simple project that in test1 I have setup to use a variable to control which URL to test and in test2 you will find an example of the extra ToURL operations that will mess up your tests when using different URL's.
I hope this helps you with your issue.
I have found when I use the recorder for web testing (both keyword and scripted tests) and then change the url from my www.test.com to www.production.com so that I can run the same test on the production site I must edit my recorded script and remove the ToURL calls that are added each time the web page loads to a new page. If you don't do this and use your new URL to launch your test the first time it encounters one of the ToURL operations it will change back to the original URL.
Also another suggestion you should include iexplore.exe in your testedApps and set up a variable for the URL you are using to test using a ToURL opperation to go to the web page after launching the testedApp iexplore.exe. This way you can set up a new Test Item and pass in the variable for your URL. This way you can have 2 different test items one with the first URL and another with the second URL that can be ran with out having to change your testedApps.
You will still want to use a wild card in your NameMapping so TestComplete can see the objects on the tested pages.
Attached you will find a simple project that in test1 I have setup to use a variable to control which URL to test and in test2 you will find an example of the extra ToURL operations that will mess up your tests when using different URL's.
I hope this helps you with your issue.