Skip to content

Commit

Permalink
14035: Add 'toJson' method to produce expected serialization (#14038)
Browse files Browse the repository at this point in the history
Co-authored-by: Puja Jagani <[email protected]>
Co-authored-by: Diego Molina <[email protected]>
  • Loading branch information
3 people authored May 28, 2024
1 parent 3cfabb9 commit 0d6ce4f
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);
}

This comment has been minimized.

Copy link
@rifaterdemsahin

rifaterdemsahin May 28, 2024

great update

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

0 comments on commit 0d6ce4f

Please sign in to comment.