Forum Discussion

maumrm's avatar
maumrm
Contributor
2 years ago
Solved

How to Navigate to Various Pages

I have about a hundred tests that are used to test an online application. This same site is hosted using different URLs and I am trying to figure out how to run these tests on the various sites. I have the name mapping generic enough that the changes to the host URL does not impact the tests. However, where I am running into issues is that in the tests direct navigation was used A LOT. 

 

So here is what I am trying to do:

Test launches through the Run Browser to a site set via a variable "http://testsite/login"

Then later on I use the Navigate step to navigate to "http://testsite/references"

 

Now I need to run this test on a different host URL which for example would be "http://newsite/login" and then directly navigate to "http://newsite/references". 

 

Is there a way that I can make that host site portion a variable? Or some sort of scripting that would allow me to directly navigate based on that initial site set via a variable? 

  • Never mind, I figured it out by using the "Code Expression" option of the Navigate function. I am able to use the site set as a variable and then add to it the new page portion.

1 Reply

  • Never mind, I figured it out by using the "Code Expression" option of the Navigate function. I am able to use the site set as a variable and then add to it the new page portion.