We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef7d1c6 commit 34da705Copy full SHA for 34da705
examples/java/src/test/java/dev/selenium/interactions/PrintOptionsTest.java
@@ -3,7 +3,7 @@
3
import org.junit.jupiter.api.Test;
4
import org.openqa.selenium.print.PageMargin;
5
import org.openqa.selenium.print.PrintOptions;
6
-
+import org.openqa.selenium.print.PageSize;
7
import dev.selenium.BaseChromeTest;
8
9
public class PrintOptionsTest extends BaseChromeTest {
@@ -31,8 +31,8 @@ public void TestSize()
31
{
32
driver.get("https://www.selenium.dev/");
33
PrintOptions printOptions = new PrintOptions();
34
- printOptions.setScale(.50);
35
- double current_scale = printOptions.getScale();
+ printOptions.setPageSize(new PageSize(27.94, 21.59)); // A4 size in cm
+ double currentHeight = printOptions.getPageSize().getHeight(); // use getWidth() to retrieve width
36
}
37
38
@Test
0 commit comments