Below is the code:
Background: Navigate to mail from inbox
Given I login into gmail as valid user
When I click on mail from Inbox
Then mail should be open
Scenario: Delete mail from Inbox
When I open mail from Inbox page
And I click on Delete icon
Then mail should be deleted
Scenario: Sent mail from Draft box
When I open mail from Draft box
And I click on Sent button
Then mail should be sent
So here I want that background should be executed only once for this feature file. Once background steps gets executed and navigated to Inbox page then scenario should be executed one after another. Once all scenarios from that feature file are executed then browser should be closed.
Right now it is executing background step then moving to first scenario executing it and being on same browser, it still goes to execute steps from background.