Using data driven keyword tests to open web pages - need advice
I am using TestComplete to create a keyword test that opens multiple web pages. I am using a data loop to run through the URLs from an excel spreadsheet.
If I use Navigate to open the web pages, it works to an extent. All 5 URLs in the excel spreadsheet do open but it uses the same web session so after the test completes, only the last URL is actually open. I want all 5 to be open once the test completes. I don't care if there are 5 tabs or 5 browser sessions, but I want to see all 5 once it's finished. Is there a way to have all 5 open once the test completes?
Hey msudawg1987,
I've encountered a similar situation before while working with TestComplete and data-driven keyword tests. It can indeed be frustrating when you want to open multiple web pages, but they end up in the same session, displaying only the last URL. Here's a solution that might work for you:
Instead of using the "Navigate" action directly, you can create a loop in your keyword test. Inside the loop, perform the following steps:
1. Open a new tab or browser session (as you mentioned, you can use Ctrl + T in Chrome).
2. Navigate to the URL from your Excel spreadsheet.
3. Repeat these steps for each URL in your list.By opening new tabs or sessions for each URL within the loop, you should achieve the desired result of having all 5 web pages open simultaneously when the test completes. This way, you'll have multiple tabs or browser sessions, each displaying a different URL.