|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openqa.selenium.Proxy
public class Proxy
Configuration parameters for using proxies in WebDriver. Generally you should pass an object of
this type to a WebDriver constructor, or in some cases to the profile object used in the
WebDriver construction. For simplicity, setting values here commits the proxy to a certain
configuration. That is, it is an error to set an httpProxy
manually and then turn
on proxy autodetect.
Nested Class Summary | |
---|---|
static class |
Proxy.ProxyType
|
Constructor Summary | |
---|---|
Proxy()
|
|
Proxy(Map<String,?> raw)
|
Method Summary | |
---|---|
String |
getFtpProxy()
Gets the FTP proxy. |
String |
getHttpProxy()
Gets the HTTP proxy. |
String |
getHttpsProxy()
Gets the HTTPS proxy. |
String |
getNoProxy()
|
String |
getProxyAutoconfigUrl()
Gets the proxy auto-configuration URL. |
Proxy.ProxyType |
getProxyType()
Gets the Proxy.ProxyType . |
String |
getSocksPassword()
Gets the SOCKS proxy's password. |
String |
getSocksProxy()
Gets the SOCKS proxy. |
String |
getSocksUsername()
Gets the SOCKS proxy's username. |
String |
getSslProxy()
Gets the SSL tunnel proxy. |
boolean |
isAutodetect()
Whether to autodetect proxy settings. |
Proxy |
setAutodetect(boolean autodetect)
Specifies whether to autodetect proxy settings. |
Proxy |
setFtpProxy(String ftpProxy)
Specify which proxy to use for FTP connections. |
Proxy |
setHttpProxy(String httpProxy)
Specify which proxy to use for HTTP connections. |
Proxy |
setHttpsProxy(String httpsProxy)
Specify which proxy to use for HTTPS connections. |
Proxy |
setNoProxy(String noProxy)
|
Proxy |
setProxyAutoconfigUrl(String proxyAutoconfigUrl)
Specifies the URL to be used for proxy auto-configuration. |
Proxy |
setProxyType(Proxy.ProxyType proxyType)
Explicitly sets the proxy type, useful for forcing direct connection on Linux. |
void |
setSocksPassword(String password)
Specifies a password for the SOCKS proxy. |
Proxy |
setSocksProxy(String socksProxy)
Specifies which proxy to use for SOCKS. |
void |
setSocksUsername(String username)
Specifies a username for the SOCKS proxy. |
Proxy |
setSslProxy(String sslProxy)
Specify which proxy to use for SSL connections. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Proxy()
public Proxy(Map<String,?> raw)
Method Detail |
---|
public Proxy.ProxyType getProxyType()
Proxy.ProxyType
. This can signal if set to use a direct connection (without proxy),
manually set proxy settings, auto-configured proxy settings, or whether to use the default
system proxy settings. It defaults to Proxy.ProxyType.UNSPECIFIED
.
public Proxy setProxyType(Proxy.ProxyType proxyType)
public boolean isAutodetect()
public Proxy setAutodetect(boolean autodetect)
autodetect
- set to true to use proxy auto detection, false to leave proxy settings
unspecified
public String getFtpProxy()
public Proxy setFtpProxy(String ftpProxy)
ftpProxy
- the proxy host, expected format is hostname.com:1234
public String getHttpProxy()
public Proxy setHttpProxy(String httpProxy)
httpProxy
- the proxy host, expected format is hostname:1234
public String getHttpsProxy()
public Proxy setHttpsProxy(String httpsProxy)
httpsProxy
- the proxy host, expected format is hostname:1234
public String getNoProxy()
public Proxy setNoProxy(String noProxy)
public String getSslProxy()
public Proxy setSslProxy(String sslProxy)
sslProxy
- the proxy host, expected format is hostname.com:1234
public String getSocksProxy()
public Proxy setSocksProxy(String socksProxy)
com.opera.core.systems.OperaDriver
.
socksProxy
- the proxy host, expected format is hostname.com:1234
public String getSocksUsername()
public void setSocksUsername(String username)
username
- username for the SOCKS proxypublic String getSocksPassword()
public void setSocksPassword(String password)
password
- password for the SOCKS proxypublic String getProxyAutoconfigUrl()
public Proxy setProxyAutoconfigUrl(String proxyAutoconfigUrl)
http://hostname.com:1234/pacfile
. This is required if getProxyType()
is
set to Proxy.ProxyType.PAC
, ignored otherwise.
proxyAutoconfigUrl
- the URL for proxy auto-configuration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |