Module: Watir::HasWindow
- Included in:
- Browser
- Defined in:
- lib/watir-webdriver/has_window.rb
Instance Method Summary (collapse)
Instance Method Details
- (Object) window(*args, &blk)
13 14 15 16 17 18 19 |
# File 'lib/watir-webdriver/has_window.rb', line 13 def window(*args, &blk) win = Window.new @driver, extract_selector(args) win.use(&blk) if block_given? win end |
- (Object) windows(*args)
3 4 5 6 7 8 9 10 11 |
# File 'lib/watir-webdriver/has_window.rb', line 3 def windows(*args) all = @driver.window_handles.map { |handle| Window.new(@driver, :handle => handle) } if args.empty? all else filter_windows extract_selector(args), all end end |