Skip to content

Commit 4744591

Browse files
committed
changed usage of URI
1 parent 40c6c79 commit 4744591

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/eliasnogueira/driver/TargetFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.openqa.selenium.WebDriver;
3232
import org.openqa.selenium.remote.RemoteWebDriver;
3333

34-
import java.net.URL;
34+
import java.net.URI;
3535

3636
import static com.eliasnogueira.config.ConfigurationManager.configuration;
3737
import static com.eliasnogueira.driver.BrowserFactory.valueOf;
@@ -57,7 +57,7 @@ private RemoteWebDriver createRemoteInstance(MutableCapabilities capability) {
5757
try {
5858
String gridURL = format("http://%s:%s", configuration().gridUrl(), configuration().gridPort());
5959

60-
remoteWebDriver = new RemoteWebDriver(new URL(gridURL), capability);
60+
remoteWebDriver = new RemoteWebDriver(URI.create(gridURL).toURL(), capability);
6161
} catch (java.net.MalformedURLException e) {
6262
logger.error("Grid URL is invalid or Grid is not available");
6363
logger.error(format("Browser: %s", capability.getBrowserName()), e);

0 commit comments

Comments
 (0)