Expose #selenium method for direct access to selenium object

This commit is contained in:
Bryan Helmkamp 2008-12-01 20:28:48 -05:00
parent 0de031c93a
commit 2a4959e7f6
2 changed files with 5 additions and 6 deletions

View File

@ -47,7 +47,8 @@ module Webrat
:select_date, :select_time, :select_datetime, :select_date, :select_time, :select_datetime,
:wait_for_page_to_load, :wait_for_page_to_load,
:field_by_xpath, :field_by_xpath,
:field_with_id :field_with_id,
:selenium
end end

View File

@ -126,12 +126,14 @@ module Webrat
selenium.key_up(locator, key_code) selenium.key_up(locator, key_code)
end end
def browser def selenium
return $browser if $browser return $browser if $browser
setup setup
$browser $browser
end end
webrat_deprecate :browser, :selenium
protected protected
def setup #:nodoc: def setup #:nodoc:
@ -147,10 +149,6 @@ module Webrat
teardown_at_exit teardown_at_exit
end end
def selenium #:nodoc:
browser
end
def teardown_at_exit #:nodoc: def teardown_at_exit #:nodoc:
at_exit do at_exit do
silence_stream(STDOUT) do silence_stream(STDOUT) do