Dashboard > Watir > ... > Pop Ups > New Browser Windows
Watir Log In View a printable version of the current page.
New Browser Windows
Added by Zeljko, last edited by Zeljko on Mar 20, 2008  (view change) show comment
Labels: 
(None)

New Browser Windows

This is basically a new window that contains HTML. They can be opened in many ways, but the following HTML is typical:

<a href = http://www.google.com target="_blank">Get Google in a new window</a>

It would appear like an existing browser window, but may not have the address bar or other toolbars.

You would use the Watir attach method to access it, like so:

ie2 = Watir::IE.attach(:url, 'http://mytestsite')
ie3 = Watir::IE.attach(:title, 'Test New Window')

You can use a regular expression on URL or title like this:

ie4 = Watir::IE.attach(:url, /mytestsite/)
ie5 = Watir::IE.attach(:title, /Test New/)

Note: be careful to not assign the new window to your ie variable. Give the attached window variable a different name, like ie2.

Go to contents, previous, next page.

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators