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

How to Achive the Ctrl + N operation in WebAii

1 Answer 121 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hari
Top achievements
Rank 1
Hari asked on 20 Jul 2011, 08:08 AM
Hi,

I want to open the same url in multiple browsers windows. Like manually using Ctrl + N we can open the same browser window(same url).
how can we achive this in WebAii?

Thanks,
Hari

1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 20 Jul 2011, 05:08 PM
Hello Hari,

You can open and close new browser instances with coded steps. Since Test Studio automatically launches and closes the main browser window, you will have to manually launch a new instance and close it after the desired actions and verifications are performed. Once closed, focus returns to the main window and it is closed by Test Studio upon test completion.

//Launch new browser window
Manager.LaunchNewBrowser();

//Close the last window opened
ActiveBrowser.Close();

See the attached test for an example. If you like to navigate to a page in code, here's how to do that:

ActiveBrowser.NavigateTo("http://www.telerik.com/");


Regards,
Anthony
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
Tags
General Discussions
Asked by
Hari
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or