Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow to reuse browser between scenarios - make it configurable #87

Open
ZakharGr opened this issue May 10, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@ZakharGr
Copy link

ZakharGr commented May 10, 2022

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.

@SabotageAndi SabotageAndi added the enhancement New feature or request label May 12, 2022
@OleksiiKhorunzhak
Copy link

OleksiiKhorunzhak commented Oct 11, 2023

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 "" column should be visible
When I hide the column named "" in the menu as ""
Then the "" column should not be visible
Examples:
| ColumnName | MenuColumnName |
| DiscountName | Discount Name |
| DiscountPercent | Discount Percent |
| Note | Note |
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants