We have two web application one for development which is http://Server1/MyApp and one for regression test execution which is http://Server2/MyApp. We have web tests that we initially recorded on http://Server1/MyApp and then we run regression testing against our application on http://Server2/MyApp but fails because it couldn't find a frame because the baseurl of that from was http://Server1/MyApp/frame1.aspx
Hello Mackie,
This is expected when running the same recorded tests against multiple environments. Your test was recorded on http://Server1/MyApp, so the iFrame is mapped by default with its full URL (for example, http://Server1/MyApp/frame1.aspx). When you run on http://Server2/MyApp, the frame cannot be found because the host does not match.
To make tests work across environments, use BaseURL:
If you run via a Test List, note that Test Lists have their own BaseURL property. If set, it overrides the project BaseURL.
For the iFrame specifically: In Elements Explorer, select the Frame node and set UsesBaseUrlHost = True. Then Test Studio will automatically swap only the host part of the frame URL when you change BaseURL. More on how to use baseURL with frames you can find in this KB article.