Skip to content

Commit ed15c6c

Browse files
committed
active element in w3c is a GET, json wire is a POST
Updates #2751
1 parent a23e152 commit ed15c6c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

java/client/src/org/openqa/selenium/remote/http/AbstractHttpCommandCodec.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import static org.openqa.selenium.remote.DriverCommand.FIND_ELEMENTS;
4343
import static org.openqa.selenium.remote.DriverCommand.FULLSCREEN_CURRENT_WINDOW;
4444
import static org.openqa.selenium.remote.DriverCommand.GET;
45-
import static org.openqa.selenium.remote.DriverCommand.GET_ACTIVE_ELEMENT;
4645
import static org.openqa.selenium.remote.DriverCommand.GET_ALL_COOKIES;
4746
import static org.openqa.selenium.remote.DriverCommand.GET_ALL_SESSIONS;
4847
import static org.openqa.selenium.remote.DriverCommand.GET_APP_CACHE_STATUS;
@@ -189,7 +188,6 @@ public AbstractHttpCommandCodec() {
189188

190189
defineCommand(FIND_ELEMENT, post("/session/:sessionId/element"));
191190
defineCommand(FIND_ELEMENTS, post("/session/:sessionId/elements"));
192-
defineCommand(GET_ACTIVE_ELEMENT, post("/session/:sessionId/element/active"));
193191
defineCommand(GET_ELEMENT_PROPERTY, get("/session/:sessionId/element/:id/property/:name"));
194192
defineCommand(CLICK_ELEMENT, post("/session/:sessionId/element/:id/click"));
195193
defineCommand(CLEAR_ELEMENT, post("/session/:sessionId/element/:id/clear"));

java/client/src/org/openqa/selenium/remote/http/JsonHttpCommandCodec.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import static org.openqa.selenium.remote.DriverCommand.DISMISS_ALERT;
2222
import static org.openqa.selenium.remote.DriverCommand.EXECUTE_ASYNC_SCRIPT;
2323
import static org.openqa.selenium.remote.DriverCommand.EXECUTE_SCRIPT;
24+
import static org.openqa.selenium.remote.DriverCommand.GET_ACTIVE_ELEMENT;
2425
import static org.openqa.selenium.remote.DriverCommand.GET_ALERT_TEXT;
2526
import static org.openqa.selenium.remote.DriverCommand.GET_CURRENT_WINDOW_HANDLE;
2627
import static org.openqa.selenium.remote.DriverCommand.GET_CURRENT_WINDOW_POSITION;
@@ -73,6 +74,8 @@ public JsonHttpCommandCodec() {
7374
defineCommand(DISMISS_ALERT, post("/session/:sessionId/dismiss_alert"));
7475
defineCommand(GET_ALERT_TEXT, get("/session/:sessionId/alert_text"));
7576
defineCommand(SET_ALERT_VALUE, post("/session/:sessionId/alert_text"));
77+
78+
defineCommand(GET_ACTIVE_ELEMENT, post("/session/:sessionId/element/active"));
7679
}
7780

7881
@Override

java/client/src/org/openqa/selenium/remote/http/W3CHttpCommandCodec.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import static org.openqa.selenium.remote.DriverCommand.FIND_CHILD_ELEMENTS;
2626
import static org.openqa.selenium.remote.DriverCommand.FIND_ELEMENT;
2727
import static org.openqa.selenium.remote.DriverCommand.FIND_ELEMENTS;
28+
import static org.openqa.selenium.remote.DriverCommand.GET_ACTIVE_ELEMENT;
2829
import static org.openqa.selenium.remote.DriverCommand.GET_ALERT_TEXT;
2930
import static org.openqa.selenium.remote.DriverCommand.GET_CURRENT_WINDOW_HANDLE;
3031
import static org.openqa.selenium.remote.DriverCommand.GET_CURRENT_WINDOW_POSITION;
@@ -89,6 +90,8 @@ public W3CHttpCommandCodec() {
8990
defineCommand(DISMISS_ALERT, post("/session/:sessionId/alert/dismiss"));
9091
defineCommand(GET_ALERT_TEXT, get("/session/:sessionId/alert/text"));
9192
defineCommand(SET_ALERT_VALUE, post("/session/:sessionId/alert/text"));
93+
94+
defineCommand(GET_ACTIVE_ELEMENT, get("/session/:sessionId/element/active"));
9295
}
9396

9497
@Override

0 commit comments

Comments
 (0)