Skip to main content

ParallelSession

clearAllSessions​

This method clears all the started sessions.

import static io.github.boykaframework.manager.ParallelSession.clearAllSessions;
. . .
clearAllSessions ();

clearSession​

This method clears the current session.

import static io.github.boykaframework.manager.ParallelSession.clearSession;
. . .
clearSession ();

createSession (platformType, configKey)​

This method will create the session for the mentioned persona.

import static io.github.boykaframework.manager.ParallelSession.createSession;
. . .
createSession (PlatformType.WEB, "test_chrome");

createSession (persona, platformType, configKey)​

This method will create the session for the mentioned persona.

import static io.github.boykaframework.manager.ParallelSession.createSession;
. . .
createSession ("User 1", PlatformType.WEB, "test_chrome");

getCurrentPersona​

This method gets the current session persona name.

import static io.github.boykaframework.manager.ParallelSession.getCurrentPersona;
. . .
var sessionPersona = getCurrentPersona ();

getSession​

This method gets the current Driver session

import static io.github.boykaframework.manager.ParallelSession.getSession;
. . .
var session = getSession ();

switchPersona (persona)​

This method will switch the current session context to a different persona. This is best when you are working on multiple user sessions.

import static io.github.boykaframework.manager.ParallelSession.switchPersona;
. . .
switchPersona ("User 2");