MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / fromJson

Method fromJson

java/src/org/openqa/selenium/remote/SessionId.java:58–71  ·  view source on GitHub ↗
(Object raw)

Source from the content-addressed store, hash-verified

56 }
57
58 private static SessionId fromJson(Object raw) {
59 if (raw instanceof String) {
60 return new SessionId(String.valueOf(raw));
61 }
62
63 if (raw instanceof Map) {
64 Map<?, ?> map = (Map<?, ?>) raw;
65 if (map.get("value") instanceof String) {
66 return new SessionId(String.valueOf(map.get("value")));
67 }
68 }
69
70 throw new JsonException("Unable to coerce session id from " + raw);
71 }
72}

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected