Skip to content

Commit

Permalink
14035: Add 'toJson' method to produce expected serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sbabcoc committed May 27, 2024
1 parent 98c6eb0 commit 0df790d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions java/src/org/openqa/selenium/Rectangle.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.openqa.selenium;

import java.util.Map;
import java.util.Objects;

public class Rectangle {
Expand Down Expand Up @@ -64,6 +65,10 @@ public Dimension getDimension() {
return new Dimension(width, height);
}

private Map<String, Object> toJson() {
return Map.of("width", width, "height", height, "x", x, "y", y);
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand Down

0 comments on commit 0df790d

Please sign in to comment.