Forum Discussion

rauny's avatar
rauny
Occasional Contributor
11 years ago

How to run Keyword tests in different urls.

Hi guys, I need some advice to adjust my Keyword Tests. I've already recorded my tests, and that worked fine. But, now I need to run the same tests in different Urls. I've tried creating...
  • tristaanogre's avatar
    11 years ago
    Without using namemapping, it's a bit trickier.  You most likely will not be able to retain your recorded steps.  You may need to re-construct your keyword test.  Basically, you'd need to do something like



    1. Use the Call Object Method test action to call the ToURL method on the Sys.Browser() object, passing in the URL variable to the method.


    2. Add in your On Screen actions manually... when prompted for the page object (NameMapping.Sys.Browser().Page()) enter an asterisk (*) for the page URL.  This will take whatever page you have up.


    Honestly, it's a LOT easier if you at least map your page and then set the URL value on your page to be your project variable for the URL.



    Now, based upon your original post, it LOOKS like all you are changing in the URL is the port number.  In which case, step 1 above may be all that is necessary to open up your initial URL.   Then you can double click on each action and just replace the port number in your action with the asterisk.



    Hope this helps.