Because Tor Browser Bundle is just a patched version of Firefox, it seems that it should be possible to use a FirefoxDriver with Tor Browser. This is what I\'ve
I would try specifying the path of one of the existing profiles and initialize your profile instance for Tor so your code would look something like:
String torPath = "..\\Tor Browser\\Browser\\firefox.exe";
String profilePath = "..\\Tor Browser\\Data\Browser\\profile.default";
FirefoxProfile profile = new FirefoxProfile(new File(profilePath));
FirefoxBinary binary = new FirefoxBinary(new File(torPath));
FirefoxDriver driver = new FirefoxDriver(binary, profile);
driver.get("http://www.google.com");
I didn't try this since I don't have WebDriver setup at home, but this should allow you to specify a profile.