I am able to connect to tor using Firefox driver, but i want to know if i can connect to tor using phantomjs or html-unit driver?
for pantomjs i tried the below code
String[] phantomArgs = new String[] {
"--webdriver-loglevel=NONE",
"--webdriver=localhost:9150"
};
DesiredCapabilities dcaps = new DesiredCapabilities();
dcaps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, phantomjs.getAbsolutePath());
dcaps.setCapability( "phantomjs.cli.args", phantomArgs);
WebDriver driver = new PhantomJSDriver(dcaps);
if not then is there similar free proxy server which i can use ?
Sorry of the late answer.I have not personally tried tor with phantomjs but i have always been an ardent user of tor with all major browsers.I think the issue here occurs because you have not set the proxy type ie)You can indicate SOCKS proxy configuration
--proxy-type=socks5
Because tor is a socks proxy and not an http proxy
Hope this helps you...If it is still not working kindly get back.