Skip to content

Fields accessed by After hooks are null when using Spring or Guice #23

@aparkinson

Description

@aparkinson
public class SomeHooks {

   private WebDriver driver;

    @Before
    public void startBrowser() {
        driver = new FirefoxDriver();
    }

    @After
    public void quitBrowser() {
        driver.quit();
    }
}

When using Spring or Guice (It does not affect picocontainer) the "driver" field will be null when accessed by the "quitBrowser" method executed as the After hook.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions