de.lgohlke.junit.FreeportProber Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webdriver Show documentation
Show all versions of webdriver Show documentation
adds some essential webdriver util classes
The newest version!
package de.lgohlke.junit;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.junit.rules.ExternalResource;
import org.openqa.selenium.net.PortProber;
@RequiredArgsConstructor
@Slf4j
public class FreeportProber extends ExternalResource {
@Getter
private int port;
@Override
protected void before() throws Throwable {
port=PortProber.findFreePort();
log.info("found free port: {}",port);
}
}