Hi Mauro, thanks for taking your time to reply. I mentioned PerStoryWebDriverSteps as an example of how the framework cleans up the resources. In this case, when the end() method is invoked, the ThreadLocal<WebDriver> instance associated with the current thread is removed but, if you'd used a FluentWebDriverPage instead of a WebDriverPage, a ThreadLocal<FluentWebDriver> will not be eliminated from the list of thread locals. Even though im not using the jbehave-core for running my tests, Im coding a lightweight selenium-based framework using testng and the jbehave-web project. As you can see below, I had to re write some of the classes to solve this issue where resources are not being removed by the DelegatingWebDriverProvider (javadoc and reference to jbehave-web will be added):
https://github.com/emacampolo/hatchery/blob/master/src/main/java/com/hatchery/core/DefaultWebDriverProvider.java https://github.com/emacampolo/hatchery/blob/master/src/main/java/com/hatchery/core/pages/FluentWebDriverPage.java This is where I invoke the end() method https://github.com/emacampolo/hatchery/blob/master/src/main/java/com/hatchery/core/Suite.java 2014-07-30 12:06 GMT-03:00 Mauro Talevi <mauro.tal...@aquilonia.org>: > Hi, > > the FluentWebDriverPage is simply a fluent-based facade using a > FluentWebDriver. The underlying WebDriverProvider is the same as a > non-fluent page and is injected in the constructor. > > The PerStoryWebDriverSteps should use exactly the same underlying > WebDriverProvider (autowired via some dependency-injection mechanism), so > if the provider end() method is invoked you shouldn't need to do anything > else. > > Are you experiencing or noticing a particular problem? If so, could you > share a project that reproduced it? > > Cheers > > > On 29/07/2014 19:14, Emanuel Campolo wrote: > >> Hi all ! >> >> I've added the jbehave-web module to a personal project where I use >> testng. I'm using the FirefoxWebDriverProvider to manage the webdriver >> instances, taking advantage of the ThreadLocal for multithreaded tests. >> My question is, even though I call the end() method every time a test >> completes to remove the driver assigned to the current thread, i don't know >> how to the same thing to the FluentWebDriver (a thread local variable that >> the FluentWebDriverPage has). >> >> I noticed that , for example, the PerStoryWebDriverSteps only executes >> driverProvider.end() but as in mentioned above, i didn't find any clean up >> for the FluentWebDriver instances that FluentWebDriverPage creates. >> >> Thanks in advance :) >> > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >