Skip to content

Commit

Permalink
Change method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
raju249 committed Jan 12, 2021
1 parent 7a4d16e commit ba94857
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion java/client/src/org/openqa/selenium/PrintsPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
package org.openqa.selenium;

public interface PrintsPage {
<X> X getPdf(Object printOptions) throws WebDriverException;
<X> X print(Object printOptions) throws WebDriverException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public <X> X getScreenshotAs(OutputType<X> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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();
}

Expand All @@ -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();
}
}

0 comments on commit ba94857

Please sign in to comment.