import { WebmateAPISession } from "../webmate-api-session"; import { SeleniumSession } from "./selenium-session"; import { BrowserSessionId, ProjectId, WebmateSeleniumSessionId } from "../types"; import { SeleniumCapability } from "./selenium-capability"; import { List } from "immutable"; import { Observable } from "rxjs"; /** * Facade to webmate's Selenium subsystem. */ export declare class SeleniumServiceClient { private session; private apiClient; constructor(session: WebmateAPISession); /** * Get a Selenium session by ID. * * @param sessionId ID of the selenium session to retrieve * @return SeleniumSession with the requested session ID */ getSeleniumsession(sessionId: WebmateSeleniumSessionId): Observable; /** * Get a Selenium session for browser session. * * @param browserSessionId ID of the browser session that is associated with the Selenium session to be returned. * @return SeleniumSession with the requested session ID */ getSeleniumSessionForBrowserSession(browserSessionId: BrowserSessionId): Observable; /** * Get all Selenium capabilities for a project by project ID. * * @param projectId ID of the project of which the capabilities should be retrieved * @return List of all Selenium capabilities in the given project (Actual type: ArrayList) */ getSeleniumCapabilitiesForProject(projectId: ProjectId): Observable>; /** * Get all Selenium sessions for a project by project ID. * * @param projectId The ID of the project of which Selenium sessions shall be retrieved * @param after (optional) An ID of a SeleniumSession, the call (and all of its other query parameters) will only take Sessions into account that were created after the Session with the given Id. * @param count (optional) The length of the output is restricted to the given integer, remaining (aka older) Sessions are not returned. Use of this parameter is highly recommended to avoid a gigantic result that needs to be send over the network. * @param state (optional) Only SeleniumSessions in the given state are considered and returned by the call, all other Sessions are filtered out. * @return (Filtered) List of Selenium sessions in the given project (Actual type: ArrayList) */ getSeleniumsessionsForProject(projectId: ProjectId, after?: WebmateSeleniumSessionId, count?: number, state?: string): Observable>; /** * Get all Selenium session IDs for a project by project ID. * * @param projectId The ID of the project of which Selenium session IDs shall be retrieved * @param after (optional) An ID of a SeleniumSession, the call (and all of its other query parameters) will only take Sessions into account that were created after the Session with the given ID. * @param count (optional) The length of the output is restricted to the given integer, remaining (aka older) Sessions are not returned. Use of this parameter is highly recommended to avoid a gigantic result that needs to be send over the network. * @param state (optional) Only SeleniumSessions in the given state are considered and returned by the call, all other Sessions are filtered out. * @return (Filtered) List of Selenium session IDs in the given project (Actual type: ArrayList) */ getSeleniumsessionIdsForProject(projectId: ProjectId, after?: WebmateSeleniumSessionId, count?: number, state?: string): Observable>; /** * Stop a Selenium session by ID. * * @param sessionId ID of the Selenium session to be stopped * @throws WebmateApiClientException if an HTTP error occurred or the Selenium session could not be found (e.g. due to missing permissions, or wrong ID) */ stopSeleniumsession(sessionId: WebmateSeleniumSessionId): Observable; }