Skip to content

Commit 528fb6c

Browse files
committed
java bidi getClientWindows implementation
1 parent e84c7fa commit 528fb6c

File tree

3 files changed

+0
-107
lines changed

3 files changed

+0
-107
lines changed

java/src/org/openqa/selenium/bidi/browser/ClientWindowState.java

Lines changed: 0 additions & 79 deletions
This file was deleted.

java/src/org/openqa/selenium/bidi/module/Browser.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
import org.openqa.selenium.bidi.BiDi;
2626
import org.openqa.selenium.bidi.Command;
2727
import org.openqa.selenium.bidi.HasBiDi;
28-
import org.openqa.selenium.bidi.browser.ClientWindow;
2928
import org.openqa.selenium.bidi.browser.ClientWindowInfo;
30-
import org.openqa.selenium.bidi.browser.ClientWindowState;
3129
import org.openqa.selenium.json.JsonInput;
3230

3331
public class Browser {
@@ -92,11 +90,4 @@ public void removeUserContext(String userContext) {
9290
public List<ClientWindowInfo> getClientWindows() {
9391
return bidi.send(new Command<>("browser.getClientWindows", Map.of(), clientWindowsInfoMapper));
9492
}
95-
96-
public ClientWindowInfo setClientWindowState(ClientWindow clientWindow, ClientWindowState state) {
97-
Map<String, Object> params = state.toMap();
98-
params.put("clientWindow", clientWindow.getId());
99-
100-
return bidi.send(new Command<>("browser.setClientWindowState", params, clientWindowInfoMapper));
101-
}
10293
}

java/test/org/openqa/selenium/bidi/browser/BrowserCommandsTest.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -88,23 +88,4 @@ void canGetClientWindows() {
8888
assertThat(windowInfo.getClientWindow()).isNotNull();
8989
assertThat(windowInfo.getState()).isNotNull();
9090
}
91-
92-
@Test
93-
@NeedsFreshDriver
94-
void canSetClientWindowState() {
95-
List<ClientWindowInfo> clientWindows = browser.getClientWindows();
96-
ClientWindow clientWindow = new ClientWindow(clientWindows.get(0).getClientWindow());
97-
98-
ClientWindowState state = ClientWindowState.maximized();
99-
ClientWindowInfo updatedWindowInfo = browser.setClientWindowState(clientWindow, state);
100-
101-
assertThat(updatedWindowInfo.getState()).isEqualTo("maximized");
102-
103-
state = ClientWindowState.normal().setWidth(800).setHeight(600);
104-
updatedWindowInfo = browser.setClientWindowState(clientWindow, state);
105-
106-
assertThat(updatedWindowInfo.getState()).isEqualTo("normal");
107-
assertThat(updatedWindowInfo.getWidth()).isEqualTo(800);
108-
assertThat(updatedWindowInfo.getHeight()).isEqualTo(600);
109-
}
11091
}

0 commit comments

Comments
 (0)