Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capybara-Webkit close webkit_server

I am using Capybara-Webkit to automate some work on a website. This is done in the background in a Resque task. After some executions there are quiet a lot webkit_server processes, that weren't closed by Capybara. So how can I force Capybara to close it at the end?

session = Capybara::Session.new(:webkit)
session.visit URL
session.click_button(BUTTON)
....
like image 872
Mark Avatar asked Nov 08 '12 11:11

Mark


1 Answers

You have to use page.quit at end of the each test case to close all the browser instance.

like image 81
Aravin Avatar answered Sep 21 '22 07:09

Aravin