title: New browser window is not opening for 2nd feature file
body: <p>When I run the TestRunner class, browser is closing in after first feature and not opening new browser when 2nd feature starts.
  Getting following error message</p>
  
  <p>Build info: version: '3.7.0', revision: '2321c73', time: '2017-11-02T22:22:35.584Z'
  System info: host: 'FIDJ0MXS2Y', ip: '10.76.49.102', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_221'
  Driver info: org.openqa.selenium.chrome.ChromeDriver
  Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 75.0.3770.80, chrome: {chromedriverVersion: 75.0.3770.140 (2d9f97485c7b..., userDataDir: C:\Users\sdad\AppData\Local...}, goog:chromeOptions: {debuggerAddress: localhost:16773}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
  Session ID: 071afb952f9a259f9df29a9809d3e4b7</p>
  
  <pre><code>package context;
  
  import java.util.HashMap;
  import java.util.Map;
  
  public class ScenarioContext
  {
      private Map&lt;String, Object&gt; scenarioContext;
  
      public ScenarioContext(){
          scenarioContext = new HashMap&lt;&gt;();
      }
  
      public void setContext(String key, Object value){
          scenarioContext.put(key.toString(), value);
      }
  
      public Object getContext(String key){
          return scenarioContext.get(key);
      }
  
      public Boolean isContains(String key){
          return scenarioContext.containsKey(key);
      }
  }
  </code></pre>
  
  <pre><code>package context;
  
  import managers.PageObjectManager;
  import managers.WebDriverManager;
  
  public class TestContext
  {
      private WebDriverManager webDriverManager;
      private PageObjectManager pageObjectManager;
      private ScenarioContext scenarioContext;
  
      public TestContext()
      {
          webDriverManager = new WebDriverManager();
          pageObjectManager = new PageObjectManager(webDriverManager.getWebDriver());
          scenarioContext = new ScenarioContext();
      }
      public WebDriverManager getWebDriverManager()
      {
          return webDriverManager;
      }
  
      public PageObjectManager getPageObjectManager()
      {
          return pageObjectManager;
      }
  
      public ScenarioContext getScenarioContext(){
          return scenarioContext;
      }
  }
  </code></pre>
  
  <pre><code>package managers;
  
  import org.openqa.selenium.WebDriver;
  import pages.*;
  
  public class PageObjectManager
  {
      private WebDriver driver;
  
      HomePage homePage;
      Page1 page1;
      Page2 page2;
  
      public PageObjectManager(WebDriver driver)
      {
          this.driver = driver;
      }
  
      public HomePage getHomePage()
      {
          return (homePage == null) ? homePage = new HomePage(driver) : homePage;
      }
  
      public Page1 getPage1()
      {
          return (page1 == null) ? page1 = new Page1(driver) : page1;
      }
  
      public Page2 getPage2()
      {
          return (page2 == null) ? page2 = new Page2(driver) : page2;
      }
  
  }
  </code></pre>
  
  <pre><code>package managers;
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  
  public class WebDriverManager
  {
      private static WebDriver driver;
  
      public WebDriverManager(){}
  
      synchronized public static WebDriver getWebDriver()
      {
          if(driver == null)
          {
              System.setProperty("webdriver.chrome.driver", "C:\\Users\\sdad\\Downloads\\Softwares\\BrowserDrivers\\chromedriver.exe");
              driver = new ChromeDriver();
              return driver;
          }
          else
          {
              return driver;
          }
      }
  }
  </code></pre>
  
  <pre><code>package pages;
  
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.support.PageFactory;
  
  public class HomePage {
  
      WebDriver driver;
      public HomePage(WebDriver driver)
      {
          this.driver = driver;
          PageFactory.initElements(driver, this);
      }
  
      public void goToHomePage()
      {
          this.driver.navigate().to("C:\\Users\\sdad\\Downloads\\Projects\\Learning\\WebPages\\page_1.html");
      }
  
      public void closeBrowser()
      {
          this.driver.close();
  //        this.driver.quit();
      }
  }
  </code></pre>
  
  <pre><code>package pages;
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.support.FindBy;
  import org.openqa.selenium.support.PageFactory;
  
  public class Page1
  {
      WebDriver driver;
      @FindBy(name = "fname_page_1")
      WebElement firstName;
  
      @FindBy(name = "lname_page_1")
      WebElement lastName;
  
      @FindBy(xpath = "//a[text()='Page 2']")
      WebElement page2Button;
  
      public Page1(WebDriver driver)
      {
          this.driver = driver;
          PageFactory.initElements(driver, this);
      }
  
      public void enterFirstName(String firstName)
      {
          this.firstName.sendKeys(firstName);
      }
      public void enterLastName(String lastName)
      {
          this.lastName.sendKeys(lastName);
      }
      public void clickPage2Button(){
          page2Button.click();
      }
  }
  </code></pre>
  
  <pre><code>package pages;
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.support.FindBy;
  import org.openqa.selenium.support.PageFactory;
  
  public class Page2
  {
      WebDriver driver;
      @FindBy(name = "fname_page_2")
      WebElement firstName;
  
      @FindBy(name = "lname_page_2")
      WebElement lastName;
  
      @FindBy(xpath = "//a[text()='Page 3']")
      WebElement page3Button;
  
      public Page2(WebDriver driver)
      {
          this.driver = driver;
          PageFactory.initElements(driver, this);
      }
      public void enterFirstName(String firstName)
      {
          this.firstName.sendKeys(firstName);
      }
      public void enterLastName(String lastName)
      {
          this.lastName.sendKeys(lastName);
      }
      public void clickPage3Button()
      {
          page3Button.click();
      }
  }
  </code></pre>
  
  <pre><code>Feature: Page 1 Feature
  
    Scenario: Page 1 - Scenario - 1
      Given I will in home page
  
    Scenario: Page 1 - Scenario - 2
      Then I will enter Dada in page 1 first name
      And I will enter peer in page 1 last name
      And I will click page 2 button
      And I will close the browser
  </code></pre>
  
  <pre><code>Feature: Page 2 Feature
  
    Scenario: Page 2 - Scenario - 1
      Given I will in home page
  
    Scenario: Page 2 - Scenario - 2
      And I will click page 2 button
      Then I will enter Dada in page 2 first name
      And I will enter peer in page 2 last name
      And I will click page 3 button
      And I will close the browser
  </code></pre>
  
  <pre><code>package stepDefinitions;
  
  import context.TestContext;
  import cucumber.api.java.en.And;
  import pages.HomePage;
  
  public class HomePageStep {
  
      TestContext testContext;
      HomePage homePage;
  
      public HomePageStep(TestContext testContext)
      {
          this.testContext = testContext;
          homePage = testContext.getPageObjectManager().getHomePage();
      }
  
      @And("^I will in home page$")
      public void goToHomePage()
      {
          homePage.goToHomePage();
      }
  
      @And("^I will close the browser$")
      public void closeBrowser()
      {
          homePage.closeBrowser();
      }
  
  }
  </code></pre>
  
  <pre><code>package stepDefinitions;
  
  import context.TestContext;
  import cucumber.api.java.en.And;
  import pages.Page1;
  
  public class Page1Step {
      TestContext testContext;
      Page1 page1;
  
      public  Page1Step(TestContext testContext)
      {
          this.testContext = testContext;
          page1 = testContext.getPageObjectManager().getPage1();
      }
  
      @And("^I will enter ([^\"]*) in page 1 first name$")
      public void enterFirstName(String firstName)
      {
          page1.enterFirstName(firstName);
      }
  
      @And("^I will enter ([^\"]*) in page 1 last name$")
      public void enterLastName(String lastName)
      {
          page1.enterLastName(lastName);
      }
  
      @And("^I will click page 2 button$")
      public void clickPage2Button() throws InterruptedException {
          page1.clickPage2Button();
          Thread.sleep(3000);
      }
  }
  </code></pre>
  
  <pre><code>package stepDefinitions;
  
  import context.TestContext;
  import cucumber.api.java.en.And;
  import pages.Page2;
  
  public class Page2Step {
      TestContext testContext;
      Page2 page2;
  
      public  Page2Step(TestContext testContext)
      {
          this.testContext = testContext;
          page2 = testContext.getPageObjectManager().getPage2();
      }
  
      @And("^I will enter ([^\"]*) in page 2 first name$")
      public void enterFirstName(String firstName)
      {
          page2.enterFirstName(firstName);
      }
  
      @And("^I will enter ([^\"]*) in page 2 last name$")
      public void enterLastName(String lastName)
      {
          page2.enterLastName(lastName);
      }
  
      @And("^I will click page 3 button$")
      public void clickPage3Button() throws InterruptedException {
          page2.clickPage3Button();
          Thread.sleep(3000);
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/a6gkI.png" alt="Folder Structure"></p>