GoogleRulesBuilder

class GoogleRulesBuilder(instrumentation: Instrumentation, packageName: String) : RulesBuilder

Builder to instantiate Google rules

Constructors

Link copied to clipboard
constructor(instrumentation: Instrumentation, packageName: String)

Functions

Link copied to clipboard
fun add(rule: GoogleRules)

Add Google rule to collection

Link copied to clipboard
open override fun all(): GoogleRulesBuilder

Adds all Google rules to collection using default configurations.

Link copied to clipboard
fun build(): List<Rule>

Build the rules collection.

Link copied to clipboard

This rule checks elements have an appropriate className set in their AccessibilityNodeInfo.

Link copied to clipboard

This rule checks if links are displayed using a ClickableSpan before Android 8.0 (API level 26).

Link copied to clipboard

This rule checks if multiple interactive items are displayed at the same location.

Link copied to clipboard

This rule checks if multiple elements have the same label.

Link copied to clipboard

This rule checks if a contentDescription has been set for editable views.

Link copied to clipboard
fun imageContrast(imageContrastRatio: Double? = null, enhancedContrastEvaluation: Boolean? = null, screenshot: Bitmap? = null): GoogleRulesBuilder

This rule checks if the contrast between foreground and background colors in images is 3.0:1 or higher.

Link copied to clipboard

This rule checks if the label of links are unclear.

Link copied to clipboard

This rule checks if the label of views contain information about it's type, state or actions.

Link copied to clipboard
fun reset()

Removes all rules from the collection.

Link copied to clipboard

This rule checks if the label of views contain information about it's type, state or actions.

Link copied to clipboard
fun textContrast(textContrastRatio: Double? = null, enhancedContrastEvaluation: Boolean? = null, screenshot: Bitmap? = null): GoogleRulesBuilder

This rule checks if text has sufficient contrast against it's background.

Link copied to clipboard

This rule checks if text scales and has sufficient space to grow in size.

Link copied to clipboard
fun touchTargetSize(touchTargetSize: Int? = null): GoogleRulesBuilder

This rule checks if touch targets have a minimum size of 48x48 density-independent pixels (dp).

Link copied to clipboard

This rule checks if accessibility services move their focus through the elements on the screen in a logical order.

Link copied to clipboard

This rule checks if all displayed text is exposed to accessibility services.