public InetAddress getIp4NonLoopbackAddressOfThisMachine ( ) { for ( NetworkInterface iface : networkInterfaceProvider . getNetworkInterfaces ( ) ) { final InetAddress ip4NonLoopback = iface . getIp4NonLoopBackOnly ( ) ; if ( ip4NonLoopback != null ) { return ip4NonLoopback ; } } throw new WebDriverException ( "Could not find a non-loopback ip4 address for this machine" ) ; }
Returns a non - loopback IP4 hostname of the local host .