Search code examples
capybaracapybara-webkit

How to clear console messages in Capybara (Driver: capybara-webkit)


I'm using Capybara with the capybara-webkit driver.

I can access console messages with

page.driver.console_messages

Is there an easy way to clear the messages, similar to how I would in a live browser?

Thanks!


Solution

  • No there is not (while leaving the page alone), however they do get cleared when the driver is reset (normally between each test)