Class PortProber


  • public class PortProber
    extends Object
    Class for determining a free localhost port that is not used by any ipv4 or ipv6 interfaces.

    Derived from SeleniumHQ / selenium

    For internal use only. May be renamed or removed in a future release.

    • Method Detail

      • findFreePort

        public static int findFreePort()
        Get a free localhost port that is not in use by any interface.
        Returns:
        found free port
        Throws:
        RuntimeException - if no free port was found