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

login with multiple users in feature file #18

Open
Bibhudattam opened this issue Nov 13, 2017 · 3 comments
Open

login with multiple users in feature file #18

Bibhudattam opened this issue Nov 13, 2017 · 3 comments

Comments

@Bibhudattam
Copy link

Bibhudattam commented Nov 13, 2017

How to login with multiple users in feature file ? Can you please explain me through example ?

When I execute with this Feature file. I am getting this error..

Feature: Gmail Login
As a user I should able to login into Gmail.

Scenario: I login with valid credential
Given I navigate to "http://the-internet.herokuapp.com/login"
And I enter "tomsmith" into input field having id "username"
And I enter "SuperSecretPassword!" into input field having id "password"
When I click on element having class "radius"
Then I should get logged-in
Then I close browser

Scenario: I login with valid credential
Given I navigate to "http://the-internet.herokuapp.com/login"
And I enter "tomsmith" into input field having id "username"
And I enter "SuperSecretPassword!" into input field having id "password"
When I click on element having class "radius"
Then I should get logged-in
Then I close browser

Starting ChromeDriver 2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f) on port 25096
Only local connections are allowed.
Nov 13, 2017 8:53:54 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Starting ChromeDriver 2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f) on port 23910
Only local connections are allowed.
Nov 13, 2017 8:54:00 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS

org.openqa.selenium.NoSuchSessionException: Session ID is null. Using WebDriver after calling quit()?
Build info: version: '3.5.2', revision: '10229a9', time: '2017-08-21T17:29:55.15Z'
System info: host: 'VCESB03', ip: '192.168.0.154', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:131)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:641)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:368)
at info.seleniumcucumber.methods.NavigateMethods.navigateTo(NavigateMethods.java:23)
at info.seleniumcucumber.stepdefinitions.PredefinedStepDefinitions.navigate_to(PredefinedStepDefinitions.java:27)
at ✽.Given I navigate to "http://the-internet.herokuapp.com/login"(E:/Bibhu/devPortal/src/test/resources/features/my_first.feature:13)

Skipped step

Skipped step

Skipped step

Skipped step

Skipped step
URL: data:,
src:

Failed scenarios:
E:/Bibhu/devPortal/src/test/resources/features/my_first.feature:12 # Scenario: I login with valid credential
2 Scenarios (1 failed, 1 passed)
11 Steps (1 failed, 5 skipped, 5 passed)
0m10.486s

org.openqa.selenium.NoSuchSessionException: Session ID is null. Using WebDriver after calling quit()?
Build info: version: '3.5.2', revision: '10229a9', time: '2017-08-21T17:29:55.15Z'
System info: host: 'VCESB03', ip: '192.168.0.154', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:131)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:641)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:368)
at info.seleniumcucumber.methods.NavigateMethods.navigateTo(NavigateMethods.java:23)
at info.seleniumcucumber.stepdefinitions.PredefinedStepDefinitions.navigate_to(PredefinedStepDefinitions.java:27)
at ✽.Given I navigate to "http://the-internet.herokuapp.com/login"(E:/Bibhu/devPortal/src/test/resources/features/my_first.feature:13)

@sameer49
Copy link
Member

sameer49 commented Nov 14, 2017

just remove "Then I close browser" step from scenario

@kumarece
Copy link

kumarece commented Oct 1, 2019

How do I close the browser for every scenario and open again ?

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

No branches or pull requests

3 participants