@Test public void getSessionIdFromPath() { assertEquals("sessionId", SeleniumSessions.getSessionIdFromPath("/session/sessionId/")); assertEquals("sessionId", SeleniumSessions.getSessionIdFromPath("/session/sessionId/getCurrentWindow")); }
public static String getSessionIdFromPath(String pathInfo) { Matcher matcher = SESSION_ID_PATTERN.matcher(pathInfo); if (matcher.matches()) { return matcher.group(1); } throw new IllegalArgumentException("Invalid request. Session Id is not present"); }
SeleniumSessions { public static String getSessionIdFromPath(String pathInfo) { Matcher matcher = SESSION_ID_PATTERN.matcher(pathInfo); if (matcher.matches()) { return matcher.group(1); } throw new IllegalArgumentException("Invalid request. Session Id is not present"); } }
SeleniumSessions { public static String getSessionIdFromPath(String pathInfo) { Matcher matcher = SESSION_ID_PATTERN.matcher(pathInfo); if (matcher.matches()) { return matcher.group(1); } throw new IllegalArgumentException("Invalid request. Session Id is not present"); } SeleniumSessions(GridRegistry registry); }
SeleniumSessions { public static String getSessionIdFromPath(String pathInfo) { Matcher matcher = SESSION_ID_PATTERN.matcher(pathInfo); if (matcher.matches()) { return matcher.group(1); } throw new IllegalArgumentException("Invalid request. Session Id is not present"); } SeleniumSessions(GridRegistry registry); URL getRemoteHostForSession(String sessionId); void refreshTimeout(String sessionId); static String getSessionIdFromPath(String pathInfo); static String trimSessionPath(String pathInfo); }
SeleniumSessions { public static String getSessionIdFromPath(String pathInfo) { Matcher matcher = SESSION_ID_PATTERN.matcher(pathInfo); if (matcher.matches()) { return matcher.group(1); } throw new IllegalArgumentException("Invalid request. Session Id is not present"); } SeleniumSessions(GridRegistry registry); URL getRemoteHostForSession(String sessionId); void refreshTimeout(String sessionId); static String getSessionIdFromPath(String pathInfo); static String trimSessionPath(String pathInfo);  }