Module: IEModal

Defined in:
lib/iemodal.rb,
lib/iemodal/version.rb

Constant Summary collapse

VERSION =
"0.0.4"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(cls) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/iemodal.rb', line 9

def self.included(cls)
	fail("This module only works with PageObject") unless cls.instance_methods.include? :modal_dialog
	define_method("modal_dialog") do |&block|
		return iemodal_watir_modal_dialog(&block) if is_ie_watir_webdriver
		return iemodal_selenium_modal_dialog(&block) if is_ie_selenium_webdriver
		return super &block			
	end
end

Instance Method Details

#iemodal_selenium_modal_dialog(&block) ⇒ Object



22
23
24
# File 'lib/iemodal.rb', line 22

def iemodal_selenium_modal_dialog(&block)
	handle_modal_dialog(browser, &block)
end

#iemodal_watir_modal_dialog(&block) ⇒ Object



18
19
20
# File 'lib/iemodal.rb', line 18

def iemodal_watir_modal_dialog(&block)
	handle_modal_dialog(browser.wd, &block)
end