org.openqa.selenium.browserlaunchers
Class MacProxyManager

java.lang.Object
  extended by org.openqa.selenium.browserlaunchers.MacProxyManager

public class MacProxyManager
extends Object

Class to manage the proxy server on OS X. It uses the 'networksetup' tool to do its magic; it also depends on 'scutil' to read some settings we need to interact with 'networksetup.'

'networksetup' seems to come in a great many varieties depending on different versions of OS X (and different architectures: PPC vs Intel), so we've taken some care to write this class very defensively.


Constructor Summary
MacProxyManager(String sessionId, int port)
           
 
Method Summary
 void backupNetworkSettings()
          Copy OS X network settings into Java's per-user persistent preference store
 void changeNetworkSettings()
          change the network settings to enable use of our proxy
 File getCustomProxyPACDir()
           
 void restoreNetworkSettings()
          Restore OS X network settings back the way thay were
protected  String runNetworkSetup(String... args)
          Execute networksetup, returning the output
protected  String runScutil(String arg)
          Execute scutil and quit, returning the output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacProxyManager

public MacProxyManager(String sessionId,
                       int port)
Method Detail

getCustomProxyPACDir

public File getCustomProxyPACDir()

changeNetworkSettings

public void changeNetworkSettings()
change the network settings to enable use of our proxy


runScutil

protected String runScutil(String arg)
Execute scutil and quit, returning the output


runNetworkSetup

protected String runNetworkSetup(String... args)
Execute networksetup, returning the output


backupNetworkSettings

public void backupNetworkSettings()
Copy OS X network settings into Java's per-user persistent preference store

See Also:
Preferences

restoreNetworkSettings

public void restoreNetworkSettings()
Restore OS X network settings back the way thay were



Copyright © 2012. All Rights Reserved.