0

I am running a selenium-server-standalone-2.39.0.jar on a Linux VM for running selenium tests in a headless way (xvfb + firefox).

While running, the Selenium server creates a lot of temporary directories and files in /tmp/ which are not deleted after the tests are finished.

The problem is that my /tmp/ disk is rather small and I would like to use /var/tmp for this purpose. However, I cannot find any way to do so.

Do you know a possibility?

rainer198
  • 3,195
  • 2
  • 27
  • 42

1 Answers1

0

Selenium uses the JVM java.io.tmpdir property for this:

java/client/src/org/openqa/selenium/io/TemporaryFilesystem.java:

  private static File sysTemp = new File(System.getProperty("java.io.tmpdir"));
  private static TemporaryFilesystem instance = new TemporaryFilesystem(sysTemp);

Set it by passing -Djava.io.tmpdir to the JVM, e.g.:

$ java -jar selenium-server-standalone-*.jar -Djava.io.tmpdir=/some/other/tmp

This question has more details about java.io.tmpdir

Community
  • 1
  • 1
minusf
  • 1,204
  • 10
  • 10
  • [this](http://stackoverflow.com/questions/15124772/selenium-2-firefox-profile-change-location) contains the answer as well, but i think the question title makes it hard to find. – minusf Dec 19 '14 at 12:21