Skip to content

Commit aab9aa5

Browse files
sbabcocpujaganidiemol
authored andcommitted
14035: Add 'toJson' method to produce expected serialization (SeleniumHQ#14038)
Co-authored-by: Puja Jagani <[email protected]> Co-authored-by: Diego Molina <[email protected]>
1 parent bcba2c6 commit aab9aa5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java/src/org/openqa/selenium/Rectangle.java

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package org.openqa.selenium;
1919

20+
import java.util.Map;
2021
import java.util.Objects;
2122

2223
public class Rectangle {
@@ -64,6 +65,10 @@ public Dimension getDimension() {
6465
return new Dimension(width, height);
6566
}
6667

68+
private Map<String, Object> toJson() {
69+
return Map.of("width", width, "height", height, "x", x, "y", y);
70+
}
71+
6772
@Override
6873
public boolean equals(Object o) {
6974
if (this == o) {

0 commit comments

Comments
 (0)