Expose #selenium method for direct access to selenium object
This commit is contained in:
parent
0de031c93a
commit
2a4959e7f6
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue