5 Answers, 1 is accepted
There is a way to do this, but before I explain those steps, I'm more concerned about test playback. Let's say we go ahead and record steps in two windows. Now we end up with a test with some steps intended for window 1 and some steps intended for window 2. Test Studio doesn't have a built-in mechanism for manually launching a second browser window in order to automate it. What are your plans for test playback to handle this? Unless you implement something to do this the steps intended for window 2 will try to execute in window 1 which obviously are going to fail.
To get a second active recording window follow these simple steps:
- Manually launch IE
- In Test Studio use the "Attach to Existing Instance" feature
You will now have two active recording browser windows you can use.
Cody
Telerik
Reserve your seat today!
Test Studio is designed around the concept of the "Active Browser". All test steps are automatically directed at the Active Browser. Test Studio does not have the concept of "run this step in window A" and "run this step in window B". It will only use the Active Browser.
"Active Browser" is defined as the last window that was opened. When the test starts a browser window is opened and Active Browser points to this window. If a popup opens as the result of some UI action (e.g. clicking a button) Test Studio will automatically connect to it and consider that browser to now be the Active Browser from that point forward. When the popup window closes Active Browser reverts back to the parent window. Thus if you have Parent -> Popup A -> Popup B, as the windows close Active Browser will revert back to Popup A first then Parent when Popup B closes followed by Popup A closing.
If you choose to use code you can have multiple browsers open and direct which window the code will act on. This doesn't work in non-coded steps however. Non-coded steps only use the Active Browser paradigm.
Cody
Telerik
Reserve your seat today!
Basically not sure how to get test studio to open a new IE instance and get the recording start in that new browser whilst having the orginal window open in the background...
The only way to cause a new browser window to open (without clicking a button that opens a popup) is via code. This code will launch the default browser type:
Manager.LaunchNewBrowser();
To launch a specific browser type use this syntax:
Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true);
Manager.LaunchNewBrowser(BrowserType.FireFox, true);
Once the browser window is open you can cause it to navigate using either of the following lines of code:
ActiveBrowser.NavigateTo("http://www.telerik.com", false);
- or -
Manager.Browsers[1].NavigateTo("http://www.telerik.com", false);
Or you could take another approach and not launch two browsers. Design your test to work in just one browser. For example, implement the following test steps:
- Last step in first web application
- Navigate To new URL for new web application
- Do some actions
- Extract the value
- Navigate To the last URL of the previous web application
- Use the value extracted above
In this approach everything is done in a single web browser. What you're doing instead is temporarily navigating away from application #1 to application #2, doing some actions in it, then navigating back to application #1 and resuming interacting with it.
Cody
Telerik
Reserve your seat today!