Hi CP
Thanks for the tip, but this still not solve my issue.
When I enable that it closes the browser on each loop.
I have a Thread Group with 4 samplers, each sampler is a script. If I enable that option it will close the browser after the 4th sampler has run and open a new one on the next loop.
What I need is to clear the cache (and cookies and everything) at the beginning of each sampler.
The browser is automatically initialized on the WSD.browser variable, Is there a way to re-initialize that variable?
I tried closing he browser at the end of the first sampler and creating a new browser on sampler #2
var selenium = JavaImporter(org.openqa.selenium);
var ffDriver = JavaImporter(org.openqa.selenium.firefox.FirefoxDriver);
WDS.browser = new ffDriver.FirefoxDriver()
And this actually works, it will close the browser and open an new instance on Sample #2, the problem is that apparently the plugin saves a reference to the instance that is crated on start and so, even when the scripts actually completes successfully it is marked as failed with this error:
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.34.0', revision: '11cd0ef93615408e0b6b3bfa28defe125906461a', time: '2013-08-06 11:43:14'
System info:
os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.1', java.version: '1.7.0_51'
Driver info: driver.version: RemoteWebDriver
Any ideas?