1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

deprecate rather than remove #browser_initialized? (it was public driver API)

This commit is contained in:
Thomas Walpole 2016-04-04 12:49:44 -07:00
parent 88eb97aaa4
commit 6a72a105b5
3 changed files with 16 additions and 0 deletions

View file

@ -134,4 +134,10 @@ class Capybara::Driver::Base
def needs_server?
false
end
# @deprecated This method is being removed
def browser_initialized?
warn "DEPRECATED: #browser_initialized? is deprecated and will be removed in the next version of Capybara"
true
end
end

View file

@ -87,6 +87,11 @@ class Capybara::RackTest::Driver < Capybara::Driver::Base
@browser = nil
end
# @deprecated This method is being removed
def browser_initialized?
super && !@browser.nil?
end
def get(*args, &block); browser.get(*args, &block); end
def post(*args, &block); browser.post(*args, &block); end
def put(*args, &block); browser.put(*args, &block); end

View file

@ -263,6 +263,11 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
Selenium::WebDriver::Error::NoSuchWindowError
end
# @deprecated This method is being removed
def browser_initialized?
super && !@browser.nil?
end
private
def within_given_window(handle)