[Wtr-general] Not able to find the title of newly opened window.

matt forum-watir-users at openqa.org
Thu Jun 7 17:17:15 EDT 2007


In many cases, the application I am testing pops up windows with *no* title.  As a result, I sometimes encounter similar experiences to you.  In these circumstances, right click on the page to get some part of the URL.  Then do something like:

browser = Watir::IE.attach(:url,/match_string/)

In this way, you can define a regular expression to match against the URL.  In many cases, the info on the page is reflected in the name of the page you are accessing.  For example, say the "Order History" page does not contain a title.  But, the "Order History" page is contained in the ".../ordhist.asp" URL.  You could execute something like:

browser = Watir::IE.attach(:url,/ordhist.asp/)

Hope this helps


More information about the Wtr-general mailing list