DriverManager

class DriverManager() extends LazyLogging

Provides and manages access to the web drivers.

Companion:
object
trait LazyLogging
class Object
trait Matchable
class Any

Value members

Concrete methods

def closeChild(): Unit
def closeWindow(occurrence: Int): Unit
def getSessionId: Option[String]
def getSessionId(driver: WebDriver): Option[String]

Starts a new session if there isn't one or stays in the current one.

Starts a new session if there isn't one or stays in the current one.

def noOfSessions(): Int

Gets the number of open sesions.

Gets the number of open sesions.

def noOfWindows(): Int

Gets the number of open windows.

Gets the number of open windows.

def quit(): Unit

Quits all browsers and closes the web drivers (if any have loaded).

Quits all browsers and closes the web drivers (if any have loaded).

def quit(name: String): Unit

Quits a named browser and associated web driver instance.

Quits a named browser and associated web driver instance.

def reset(): Unit

Resets the driver manager.

Resets the driver manager.

Switches to the top window / first frame

Switches to the top window / first frame

def switchToNewWindow(winType: WindowType): Unit

Starts and switches to a new tab or window.

Starts and switches to a new tab or window.

Value parameters:
winType

tab or window

def switchToParent(): Unit

Switches to the parent window.

Switches to the parent window.

def switchToSession(session: String): Unit

Switches the web driver session

Switches the web driver session

Value parameters:
session

the name of the session to switch to

def switchToWindow(occurrence: Int): Unit

Switches to a tab or window occurance.

Switches to a tab or window occurance.

Value parameters:
occurrence

the tag or window occurrence to switch to (primary is zero, 1st opened is 1, 2nd open is 2, ..)

def windows(): List[String]
def withWebDriver[T](f: WebDriver => T): T

Invokes a function that performs an operation on the current web driver.

Invokes a function that performs an operation on the current web driver.

Value parameters:
f

the function to perform

Inherited fields

lazy protected val logger: Logger
Inherited from:
LazyLogging