mardi 7 janvier 2020

How to configure capybara not to clear cookies and reset session

Between running one test scenario and another, the default Capybara setting opens the blank page and clears cookies from the previous scenario, eliminating the session that was recorded in the first scenario.

How to configure Capybara not to clear cookies of a session between one scenario and another?

These are the settings I currently have

require 'capybara'
require 'capybara/cucumber'
require 'selenium-webdriver'

Capybara.configure do |config|
    config.default_driver = :selenium_chrome
    config.default_max_wait_time = 10
    config.app_host = 'https://website.com'    
end

Aucun commentaire:

Enregistrer un commentaire