Module: Watir::WindowSwitching
- Included in:
- Browser
- Defined in:
- lib/watir-webdriver/window_switching.rb
Defined Under Namespace
Classes: NoMatchingWindowFoundException
Instance Method Summary
collapse
Instance Method Details
#window(*args, &blk) ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/watir-webdriver/window_switching.rb', line 17
def window(*args, &blk)
win = Window.new @driver, (args)
win.use(&blk) if block_given?
win
end
|
#windows(*args) ⇒ Object
7
8
9
10
11
12
13
14
15
|
# File 'lib/watir-webdriver/window_switching.rb', line 7
def windows(*args)
all = @driver.window_handles.map { |handle| Window.new(@driver, :handle => handle) }
if args.empty?
all
else
filter_windows(args, all, :select)
end
end
|