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,
:wait_for_page_to_load,
:field_by_xpath,
:field_with_id
:field_with_id,
:selenium
end

View File

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