org.openqa.selenium.net
Class NetworkUtils
java.lang.Object
org.openqa.selenium.net.NetworkUtils
public class NetworkUtils
- extends java.lang.Object
Method Summary |
java.lang.String |
getIpOfLoopBackIp4()
|
static java.lang.String |
getNetWorkDiags()
|
java.lang.String |
getNonLoopbackAddressOfThisMachine()
Used by the mobile emulators that refuse to access localhost or 127.0.0.1
The ip4/ip6 requirements of this method are as-of-yet unspecified, but we return
the string that is associated with the ip4 interface |
java.lang.String |
getPrivateLocalAddress()
|
static void |
main(java.lang.String[] args)
|
java.lang.String |
obtainLoopbackIp4Address()
Returns a single address that is guaranteed to resolve to an ipv4 representation of localhost
This may either be a hostname or an ip address, dependending if we can guarantee what that the hostname will resolve to ip4. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NetworkUtils
public NetworkUtils()
getPrivateLocalAddress
public java.lang.String getPrivateLocalAddress()
getNonLoopbackAddressOfThisMachine
public java.lang.String getNonLoopbackAddressOfThisMachine()
- Used by the mobile emulators that refuse to access localhost or 127.0.0.1
The ip4/ip6 requirements of this method are as-of-yet unspecified, but we return
the string that is associated with the ip4 interface
- Returns:
obtainLoopbackIp4Address
public java.lang.String obtainLoopbackIp4Address()
- Returns a single address that is guaranteed to resolve to an ipv4 representation of localhost
This may either be a hostname or an ip address, dependending if we can guarantee what that the hostname will resolve to ip4.
- Returns:
- The address part og such an address
getIpOfLoopBackIp4
public java.lang.String getIpOfLoopBackIp4()
getNetWorkDiags
public static java.lang.String getNetWorkDiags()
main
public static void main(java.lang.String[] args)
throws java.net.SocketException
- Throws:
java.net.SocketException
Copyright © 2011. All Rights Reserved.