Skip to content

Commit

Permalink
Fixing use of deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Mar 3, 2018
1 parent f9cba0f commit 29b5bb4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ public class AppServerTest {
private static WebDriver driver;

@BeforeClass
public static void startDriver() throws Throwable {
public static void startDriver() {
driver = new WebDriverBuilder().get();
}

@Before
public void startServer() throws Throwable {
public void startServer() {
server = new JettyAppServer();
server.start();
}
Expand Down Expand Up @@ -132,7 +132,7 @@ public void uploadsFile() throws Throwable {
String FILE_CONTENTS = "Uploaded file";
File testFile = File.createTempFile("webdriver", "tmp");
testFile.deleteOnExit();
Files.write(FILE_CONTENTS, testFile, StandardCharsets.UTF_8);
Files.asCharSink(testFile, StandardCharsets.UTF_8).write(FILE_CONTENTS);

driver.get(server.whereIs("upload.html"));
driver.findElement(By.id("upload")).sendKeys(testFile.getAbsolutePath());
Expand Down

0 comments on commit 29b5bb4

Please sign in to comment.