HumHub Documentation (unofficial)

ScreenshotHelper
in package

Helper class to handle taking, decoding and screenshots using WebDriver.

Table of Contents

Properties

$executor  : RemoteExecuteMethod

Methods

__construct()  : mixed
takeElementScreenshot()  : mixed
takePageScreenshot()  : string
createDirectoryIfNotExists()  : mixed
saveScreenshotToPath()  : mixed
takeScreenshot()  : mixed

Properties

Methods

takeElementScreenshot()

public takeElementScreenshot(mixed $elementId[, mixed $saveAs = null ]) : mixed
Parameters
$elementId : mixed
$saveAs : mixed = null

takePageScreenshot()

public takePageScreenshot([string|null $saveAs = null ]) : string
Parameters
$saveAs : string|null = null
Tags
throws
WebDriverException
Return values
string

createDirectoryIfNotExists()

private createDirectoryIfNotExists(mixed $directoryPath) : mixed
Parameters
$directoryPath : mixed

saveScreenshotToPath()

private saveScreenshotToPath(mixed $screenshot, mixed $path) : mixed
Parameters
$screenshot : mixed
$path : mixed

takeScreenshot()

private takeScreenshot(array<string|int, mixed> $commandToExecute[, mixed $saveAs = null ]) : mixed
Parameters
$commandToExecute : array<string|int, mixed>
$saveAs : mixed = null

        
On this page

Search results