Reputation: 16383
In a feature spec, the following code;
browser = Capybara.current_session.driver.browser
browser.clear_cookies
raises this deprecation message;
[DEPRECATION] Capybara::Webkit::Driver#browser is deprecated.
How do I remove this?
Upvotes: 1
Views: 1059
Reputation: 49890
By removing that statement. Some methods on driver
are being removed from the public API in the next release of capybara-webkit. Since you've indicated that you were calling clear_cookies on the browser
object, you can now just call it on the driver
object.
Capybara.current_session.driver.clear_cookies
Upvotes: 2