Method: Watir::IE.attach

Defined in:
lib/watir/ie-class.rb

.attach(how, what) ⇒ Object

Return a Watir::IE object for an existing IE window. Window can be referenced by url, title, or window handle. Second argument can be either a string or a regular expression in the case of of :url or :title. IE.attach(:url, ‘www.google.com’) IE.attach(:title, ‘Google’) IE.attach(:hwnd, 528140) This method will not work when Watir/Ruby is run under a service (instead of a user).



143
144
145
146
147
# File 'lib/watir/ie-class.rb', line 143

def self.attach how, what
  ie = new true # don't create window
  ie._attach_init(how, what)
  ie
end