Commit 11647cc
authored
[java] Fixing options handling for print command
Prior to this change, when executing e.g. a `RemoteWebDriver#print`
command, the print options passed to the method were passed through to
the chromedriver instance, but serialized in a wrong format, rendering
them uneffective. The issues were:
- Options were wrapped in an `options` key when chromedriver expected
them to be at the top-level of the parameters dict (see [here](https://github.com/chromium/chromium/blob/main/chrome/test/chromedriver/window_commands.cc#L2246))
- Page size options were put into a `pageSize` key, when chromedriver
expected it to be a `page` key (see [here](https://github.com/chromium/chromium/blob/main/chrome/test/chromedriver/window_commands.cc#L539))
Also, using the `PageSize` class supplied by selenium was not possible,
due to defaulting to constant page sizes, not allowing the consumer to
override them. This was addressed by adding a second constructor
allowing to specify height/width.1 parent 74f6344 commit 11647cc
4 files changed
Lines changed: 44 additions & 3 deletions
File tree
- java/src/org/openqa/selenium
- print
- remote
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | | - | |
26 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
27 | 40 | | |
28 | 41 | | |
29 | 42 | | |
| |||
98 | 111 | | |
99 | 112 | | |
100 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
101 | 130 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| |||
0 commit comments