Open ZakharGr opened 2 years ago
Also need this feature. I want to keep the browser session between tests to save time. In my case each test needs to log in and navigate to a page, it is very inconvenient to perform it each time for each test. I'd like to create some Feature background that would work as a time feature setup for all outlines.
Like this: `Feature: Discount Column Configuration
As an Admin User, I want to log in I want to open the Discount page And I see the Discount Table Column Configuration displaying the proper Columns So that I can hide and show all Discount Table columns.
FeatureBackground: #Should be executed once per feature open browser, login, go to page Given: I log in as Admin User And I navigate to Discount page
Background: # Should be executed for each test example and keep browser session and page object from FeatureBackground Given Being on Discount page I refreshed column configuration
Scenario Outline: Verify Discount Table column visibility
Given I am on the Discount page with refresh set to "true"
Then the "
As per documentation from SpecFlow.Actions.Selenium:
The browser is started automatically when you try to use the WebDriver the first time. It is closed after the scenario ends.
If I need to reuse the browser session between scenarios within 1 feature file, I cannot use BrowserDriver/BrowserInteraction in the current implementation, need to develop my own container with webdriver.
It would be nice if specflow.actions.json has the setting that will prevent closing WebDriver after the scenario ends and leave it for developer to decide when quit the driver/browser OR add configuration to close it after feature ends.