Hi Scott,
Thanks a ton for your response. I tried setting the proxy in System Preferences but I am hitting other problem. I get an unknown host exception when the Safari driver tries to connect to the selenium server. Can you please let me what I am missing.
In System preferences Web Proxy(HTTP) -> 17.218.71.96 9101 (ip and port for server)
my code :
ProxyServer server = new ProxyServer(9101) ;
server.start();
// get the Selenium proxy object
Proxy proxy = server.seleniumProxy();
// configure it as a desired capability
//DesiredCapabilities capabilities = new DesiredCapabilities();
DesiredCapabilities capabilities = DesiredCapabilities.safari();
// start the browser up
WebDriver driver = new SafariDriver(capabilities);
In the last step, I get the following exception:
Apr 11, 2014 5:17:19 PM org.openqa.selenium.safari.SafariDriverCommandExecutor start
INFO: Waiting for SafariDriver to connect
Apr 11, 2014 5:17:20 PM net.lightbody.bmp.proxy.util.Log info
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverCommandExecutor stop
INFO: Shutting down
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverCommandExecutor stop
INFO: Stopping Safari
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverCommandExecutor stop
INFO: Stopping server
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverServer stop
INFO: Stopping server
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverCommandExecutor stop
INFO: Uninstalling extensions
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverCommandExecutor stop
INFO: Shutdown complete
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverCommandExecutor stop
INFO: Shutting down
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverCommandExecutor stop
INFO: Stopping server
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverCommandExecutor stop
INFO: Uninstalling extensions
Apr 11, 2014 5:18:04 PM org.openqa.selenium.safari.SafariDriverCommandExecutor stop
INFO: Shutdown complete