From ba948575b8ea88c613ce81cd33744815ddffec30 Mon Sep 17 00:00:00 2001 From: Rajendra Kadam Date: Tue, 12 Jan 2021 11:57:02 +0530 Subject: [PATCH] Change method signature --- java/client/src/org/openqa/selenium/PrintsPage.java | 2 +- .../src/org/openqa/selenium/remote/RemoteWebDriver.java | 2 +- .../openqa/selenium/firefox/FireFoxPrintCommandTest.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/java/client/src/org/openqa/selenium/PrintsPage.java b/java/client/src/org/openqa/selenium/PrintsPage.java index cbc10b3c15e891..1be320c3eb3bad 100644 --- a/java/client/src/org/openqa/selenium/PrintsPage.java +++ b/java/client/src/org/openqa/selenium/PrintsPage.java @@ -17,5 +17,5 @@ package org.openqa.selenium; public interface PrintsPage { - X getPdf(Object printOptions) throws WebDriverException; + X print(Object printOptions) throws WebDriverException; } diff --git a/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java b/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java index 7bb161bbb2204a..95d925a60a9f25 100644 --- a/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java +++ b/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java @@ -326,7 +326,7 @@ public X getScreenshotAs(OutputType outputType) throws WebDriverException } @Override - public Pdf getPdf(Object printOptions) throws WebDriverException { + public Pdf print(Object printOptions) throws WebDriverException { Response response = execute(DriverCommand.PRINT_PAGE((PrintOptions) printOptions)); Object result = response.getValue(); diff --git a/java/client/test/org/openqa/selenium/firefox/FireFoxPrintCommandTest.java b/java/client/test/org/openqa/selenium/firefox/FireFoxPrintCommandTest.java index 1b4094e8831c41..4edb5ade3f835d 100644 --- a/java/client/test/org/openqa/selenium/firefox/FireFoxPrintCommandTest.java +++ b/java/client/test/org/openqa/selenium/firefox/FireFoxPrintCommandTest.java @@ -48,7 +48,7 @@ public void tearDown() { public void canPrintPage() { PrintOptions printOptions = new PrintOptions(); - Pdf pdf = localDriver.getPdf(printOptions); + Pdf pdf = localDriver.print(printOptions); assertThat(pdf.getBase64String().contains(MAGIC_STRING)).isTrue(); } @@ -57,7 +57,7 @@ public void canPrintwoPages() { PrintOptions printOptions = new PrintOptions(); printOptions.setPageRanges(new String[]{"1-2"}); - Pdf pdf = localDriver.getPdf(printOptions); + Pdf pdf = localDriver.print(printOptions); assertThat(pdf.getBase64String().contains(MAGIC_STRING)).isTrue(); } @@ -71,7 +71,7 @@ public void canPrintWithValidParams() { printOptions.setOrientation(PrintOptions.Orientation.Landscape); printOptions.setPageSize(pageSize); - Pdf pdf = localDriver.getPdf(printOptions); + Pdf pdf = localDriver.print(printOptions); assertThat(pdf.getBase64String().contains(MAGIC_STRING)).isTrue(); } }