File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
examples/java/src/test/java/dev/selenium/interactions Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3
3
import org .junit .jupiter .api .Test ;
4
4
import org .openqa .selenium .print .PageMargin ;
5
5
import org .openqa .selenium .print .PrintOptions ;
6
-
6
+ import org . openqa . selenium . print . PageSize ;
7
7
import dev .selenium .BaseChromeTest ;
8
8
9
9
public class PrintOptionsTest extends BaseChromeTest {
@@ -31,8 +31,8 @@ public void TestSize()
31
31
{
32
32
driver .get ("https://www.selenium.dev/" );
33
33
PrintOptions printOptions = new PrintOptions ();
34
- printOptions .setScale ( .50 );
35
- double current_scale = printOptions .getScale ();
34
+ printOptions .setPageSize ( new PageSize ( 27.94 , 21.59 )); // A4 size in cm
35
+ double currentHeight = printOptions .getPageSize (). getHeight (); // use getWidth() to retrieve width
36
36
}
37
37
38
38
@ Test
You can’t perform that action at this time.
0 commit comments