Method Options
Methods options are the options that can be set per method. If the option has the same key as an option that has been set during the instantiation of the plugin, this method option will override the plugin option value.
Save Options
disableCSSAnimation
- Type:
boolean
- Mandatory: No
- Default:
false
- Used with: All methods
- Supported: Web, Hybrid App (Webview)
En/Disable all CSS animations and the input caret in the application. If set to true all animations will be disabled before taking a screenshot and reset when done
enableLayoutTesting
- Type:
boolean
- Mandatory: No
- Default:
false
- Used with: All methods
- Supported: Web
This will hide all text on a page so only the layout will be used for comparison. Hiding will be done by adding the style 'color': 'transparent !important'
to each element.
For the output see Test Output
By using this flag each element that contains text (so not only p, h1, h2, h3, h4, h5, h6, span, a, li
, but also div|button|..
) will get this property. There is no option to tailor this.
hideScrollBars
- Type:
boolean
- Mandatory: No
- Default:
true
- Used with: All methods
- Supported: Web, Hybrid App (Webview)
Hide scrollbar(s) in the application. If set to true all scrollbar(s) will be disabled before taking a screenshot. This is set to default true
to prevent extra issues.
hideElements
- Type:
array
- Mandatory: no
- Used with: All methods
- Supported: Web, Hybrid App (Webview), Native App
This method can hide 1 or multiple elements by adding the property visibility: hidden
to them by providing an array of elements.
removeElements
- Type:
array
- Mandatory: no
- Used with: All methods
- Supported: Web, Hybrid App (Webview), Native App
This method can remove 1 or multiple elements by adding the property display: none
to them by providing an array of elements.
resizeDimensions
- Type:
object
- Mandatory: no
- Default:
{ top: 0, right: 0, bottom: 0, left: 0}
- Used with: Only for
saveElement
orcheckElement
- Supported: Web, Hybrid App (Webview), Native App
An object that needs to hold a top
, right
, bottom
and left
amount of pixels that need to make the element cutout bigger.
fullPageScrollTimeout
- Type:
number
- Mandatory: No
- Default:
1500
- Used with: Only for
saveFullPageScreen
orsaveTabbablePage
- Supported: Web
The timeout in milliseconds to wait after a scroll. This might help identify pages with lazy loading.
hideAfterFirstScroll
- Type:
array
- Mandatory: no
- Used with: Only for
saveFullPageScreen
orsaveTabbablePage
- Supported: Web
This method will hide one or multiple elements by adding the property visibility: hidden
to them by providing an array of elements.
This will be handy when a page for example holds sticky elements that will scroll with the page if the page is scrolled but will give an annoying effect when a full-page screenshot is made
waitForFontsLoaded
- Type:
boolean
- Mandatory: No
- Default:
true
- Used with: All methods
- Supported: Web, Hybrid App (Webview)
Fonts, including third-party fonts, can be loaded synchronously or asynchronously. Asynchronous loading means that fonts might load after WebdriverIO determines that a page has fully loaded. To prevent font rendering issues, this module, by default, will wait for all fonts to be loaded before taking a screenshot.
Compare (Check) Options
Compare options are options that influence the way the comparison, by ResembleJS is being executed.
- All options from the Save Options can be used for the Compare methods
- All compare options can be used during service instantiation or for every single check method. If a method option has the same key as an option that has been set during the instantiation of the service, then the method compare option will override the service compare option value.
- All options can be used for:
- Web
- Hybrid App
- Native App
ignoreAlpha
- Type:
boolean
- Default:
false
- Mandatory: no
Compare images and discard alpha.
blockOutSideBar
- Type:
boolean
- Default:
true
- Mandatory: no
- Remark: Can only be used for
checkScreen()
. This is iPad only
Automatically block out the sidebar for iPads in landscape mode during comparisons. This prevents failures on the tab/private/bookmark native component.
blockOutStatusBar
- Type:
boolean
- Default:
true
- Mandatory: no
- Remark: This is Mobile only
Automatically block out the status and address bar during comparisons. This prevents failures on time, wifi or battery status.
blockOutToolBar
- Type:
boolean
- Default:
true
- Mandatory: no
- Remark: This is Mobile only
Automatically block out the toolbar.