This is a migrated thread and some comments may be shown as answers.

Testing using 2 browswers concurrently

1 Answer 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jay
Top achievements
Rank 1
Jay asked on 07 Jan 2011, 05:27 PM
We are working on an interactive app so need to have 2 or more browsers opened ....any ideas on how we can go about setting up testing. We cant use IFrams type of setup as need separate cookies for session management.

Rigth now I got 2 WaitN scripts in  that communicate using Nservicebus.com

Jay

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 07 Jan 2011, 11:36 PM
Hello Jay,

It can be done but is going to require doing pretty much everything in code. The execution engine is currently modeled with the idea of interacting only with the most recent browser window opened. Under the covers the property Manager.ActiveBrowser is used by all standard (non-coded) test steps. This property is a read-only property. The framework will automatically set it to the most recently opened browser, allowing interaction with popup windows, and then automatically backtrack when the popup window is closed.

If you are willing to do things in code you need to start with something like this:

Manager.LaunchNewBrowser();
Manager.Browsers[0].Find.ByExpression<HtmlButton>("id=submit1").Click();
Manager.Browsers[1].Find.ByExpression<HtmlButton>("id=submit1").Click();

When a test starts one browser window is automatically opened by the framework. So the "Manager.LaunchNewBrowser" code will open a second browser window. Then using Manager.Browsers[n] you can select between which browser you want to interact with.

We can help you if you need further assistance with this approach.

Greetings,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
Jay
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or