diff --git a/java/client/test/org/openqa/selenium/UploadTest.java b/java/client/test/org/openqa/selenium/UploadTest.java index 5a25077727cec..ab2827ff74443 100644 --- a/java/client/test/org/openqa/selenium/UploadTest.java +++ b/java/client/test/org/openqa/selenium/UploadTest.java @@ -28,8 +28,6 @@ import static org.openqa.selenium.testing.Driver.HTMLUNIT; import static org.openqa.selenium.testing.Driver.SAFARI; -import com.google.common.io.Files; - import org.junit.Before; import org.junit.Test; import org.openqa.selenium.testing.Ignore; @@ -41,6 +39,7 @@ import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; /** @@ -119,8 +118,7 @@ public void testUploadingWithHiddenFileInput() { private File createTmpFile(String content) throws IOException { File f = File.createTempFile("webdriver", "tmp"); f.deleteOnExit(); - Files.asCharSink(f, StandardCharsets.UTF_8).write(content); + Files.write(f.toPath(), content.getBytes(StandardCharsets.UTF_8)); return f; } - } diff --git a/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java b/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java index 934e5723c13d9..637b5e0b166f2 100644 --- a/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java +++ b/java/client/test/org/openqa/selenium/chrome/ChromeOptionsFunctionalTest.java @@ -21,8 +21,6 @@ import static org.openqa.selenium.remote.CapabilityType.ACCEPT_SSL_CERTS; import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs; -import com.google.common.io.Files; - import org.junit.After; import org.junit.Test; import org.openqa.selenium.By; @@ -33,6 +31,7 @@ import org.openqa.selenium.testing.NeedsLocalEnvironment; import java.io.IOException; +import java.nio.file.Files; import java.util.Base64; /** @@ -104,7 +103,7 @@ public void canAddExtensionFromFile() { public void canAddExtensionFromStringEncodedInBase64() throws IOException { ChromeOptions options = new ChromeOptions(); options.addEncodedExtensions(Base64.getEncoder().encodeToString( - Files.toByteArray(InProject.locate(EXT_PATH).toFile()))); + Files.readAllBytes(InProject.locate(EXT_PATH)))); driver = new ChromeDriver(options); driver.get(pages.clicksPage);