Skip to content

BrowserSessionStateExtractionConfig

fredericOfTestfabrik edited this page Apr 13, 2018 · 9 revisions

State extraction is one of the key elements of webmate, as many jobs require states to work properly and deliver reasonable results. For this reason, we configured this process to be as general as possible. However, there are certain cases where one need to change the configuration of the state extraction process, for example because the website under tests has specific requirements or the performance of the state extraction needs to be optimized.

Usage

To configure the state extraction to your liking, simply create a new BrowserSessionStateExtractionConfig and pass it to the extraction command.

BrowserSessionStateExtractionConfig config = new BrowserSessionStateExtractionConfig(); //sets all entries to null , i.e use webmate default values. config.setExtractionDelay(1000) //set extraction delay to 1 second browserSession.createState("My State", config); //use the config in state extraction

Configuration

The following Tables list all available configuration variables, their effect and their default value. If a variable is set to null, the webmate default value will be choosen instead.

BrowserSessionStateExtractionConfig

Variable Effect Default
stateId The Session Id the state should belong to. If set to null, the state will be added to the currently active session null
extractionDelay The delay before state extraction is triggered. 10 seconds
extractionCooldown The delay after state extraction is finished. 20 seconds
optViewportDimension The dimensions the viewport should be resized to. Do not modify viewport dimensions
maxAdditionWaitingTimeForStateExtraction How much additional time the state extraction should get, after the projected end time is reached and the extraction isn't finished yet. 120 seconds
extractDomStateData wether DOM data should be extracted or not. true
screenShotConfig The configuration for the screenshot extraction. See ScreenShotConfig Table for details Do not take screenshots
warmUpConfig The configuration for the warmup. See WarmUpConfig Table for Details. Do not warm up

ScreenshotConfig

Similar to the BrowserSessionStateConfig, if a config variable is set to null, webmate will use its default values. Additionally if any ScreenshotConfig Object is set in the BrowserSessionStateExtractionConfig, webmate will take a screenshot during extraction.

Variable Effect Default
fullpage If set to true, webmate will try to capture the whole webpage on one screenshot. If set to false, webmate will only capture the current viewport true
hideFixedElements If set to true, webmate will try to hide elements with a fixed position during the capture of a full page screenshot. This is done so that the fixed elements appear only once on large websites and not repeatedly on a full page screenshot true

WarmUpConfig

As with the other configs, setting a value to null will prompt webmate to use the default values. Additionally setting any warmupConfig in the BrowserSessionStateExtractionConfig will trigger the warmup before a state extraction. For more details, see

Variable Effect Default
pageWarmUpScrollBy How far down the browser should scroll with each scroll command. Unit in pixels true
hideFixedElements If set to true, webmate will try to hide elements with a fixed position during the capture of a full page screenshot. This is done so that the fixed elements appear only once on large websites and not repeatedly on a full page screenshot true

Clone this wiki locally