Interface HasAndroidSettings

    • Method Detail

      • ignoreUnimportantViews

        default HasAndroidSettings ignoreUnimportantViews​(java.lang.Boolean compress)
        Set the `ignoreUnimportantViews` setting. *Android-only method*. Sets whether Android devices should use `setCompressedLayoutHeirarchy()` which ignores all views which are marked IMPORTANT_FOR_ACCESSIBILITY_NO or IMPORTANT_FOR_ACCESSIBILITY_AUTO (and have been deemed not important by the system), in an attempt to make things less confusing or faster.
        Parameters:
        compress - ignores unimportant views if true, doesn't ignore otherwise.
        Returns:
        self instance for chaining
      • configuratorSetWaitForIdleTimeout

        default HasAndroidSettings configuratorSetWaitForIdleTimeout​(java.time.Duration timeout)
        invoke setWaitForIdleTimeout in com.android.uiautomator.core.Configurator.
        Parameters:
        timeout - A negative value would reset to its default value. Minimum time unit resolution is one millisecond
        Returns:
        self instance for chaining
      • configuratorSetWaitForSelectorTimeout

        default HasAndroidSettings configuratorSetWaitForSelectorTimeout​(java.time.Duration timeout)
        invoke setWaitForSelectorTimeout in com.android.uiautomator.core.Configurator.
        Parameters:
        timeout - A negative value would reset to its default value. Minimum time unit resolution is one millisecond
        Returns:
        self instance for chaining
      • configuratorSetScrollAcknowledgmentTimeout

        default HasAndroidSettings configuratorSetScrollAcknowledgmentTimeout​(java.time.Duration timeout)
        invoke setScrollAcknowledgmentTimeout in com.android.uiautomator.core.Configurator.
        Parameters:
        timeout - A negative value would reset to its default value. Minimum time unit resolution is one millisecond
        Returns:
        self instance for chaining
      • configuratorSetKeyInjectionDelay

        default HasAndroidSettings configuratorSetKeyInjectionDelay​(java.time.Duration delay)
        invoke configuratorSetKeyInjectionDelay in com.android.uiautomator.core.Configurator.
        Parameters:
        delay - A negative value would reset to its default value. Minimum time unit resolution is one millisecond
        Returns:
        self instance for chaining
      • configuratorSetActionAcknowledgmentTimeout

        default HasAndroidSettings configuratorSetActionAcknowledgmentTimeout​(java.time.Duration timeout)
        invoke setActionAcknowledgmentTimeout in com.android.uiautomator.core.Configurator.
        Parameters:
        timeout - A negative value would reset to its default value. Minimum time unit resolution is one millisecond
        Returns:
        self instance for chaining
      • normalizeTagNames

        default HasAndroidSettings normalizeTagNames​(boolean enabled)
        Setting this value to true will enforce source tree dumper to transliterate all class names used as XML tags to the limited set of ASCII characters supported by Apache Harmony lib and used by default in Android to avoid possible XML parsing exceptions caused by XPath lookup. The Unicode to ASCII transliteration is based on JUnidecode library (https://github.com/gcardone/junidecode). Works for UIAutomator2 only.
        Parameters:
        enabled - Either true or false. The default value if false.
        Returns:
        self instance for chaining
      • setShouldUseCompactResponses

        default HasAndroidSettings setShouldUseCompactResponses​(boolean enabled)
        Whether to return compact (standards-compliant) and faster responses in find element/s (the default setting). If set to false then the response may also contain other available element attributes.
        Parameters:
        enabled - Either true or false. The default value if true.
        Returns:
        self instance for chaining
      • setElementResponseAttributes

        default HasAndroidSettings setElementResponseAttributes​(java.lang.String attrNames)
        Which attributes should be returned if compact responses are disabled. It works only if shouldUseCompactResponses is false. Defaults to "" (empty string).
        Parameters:
        attrNames - The comma-separated list of fields to return with each element.
        Returns:
        self instance for chaining
      • allowInvisibleElements

        default HasAndroidSettings allowInvisibleElements​(boolean enabled)
        Set whether the source output/xpath search should consider all elements, visible and invisible. Disabling this setting speeds up source and xml search. Works for UIAutomator2 only.
        Parameters:
        enabled - Either true or false. The default value if false.
        Returns:
        self instance for chaining
      • enableNotificationListener

        default HasAndroidSettings enableNotificationListener​(boolean enabled)
        Whether to enable or disable the notification listener. No toast notifications are going to be added into page source output if this setting is disabled. Works for UIAutomator2 only.
        Parameters:
        enabled - Either true or false. The default value if true.
        Returns:
        self instance for chaining
      • shutdownOnPowerDisconnect

        default HasAndroidSettings shutdownOnPowerDisconnect​(boolean enabled)
        Whether to enable or disable shutdown the server through the broadcast receiver on ACTION_POWER_DISCONNECTED.
        Parameters:
        enabled - Either true or false. The default value if true.
        Returns:
        self instance for chaining
      • setTrackScrollEvents

        default HasAndroidSettings setTrackScrollEvents​(boolean enabled)
        Turn on or off the tracking of scroll events as they happen. If true, a field lastScrollData is added to the results of getSession, which can then be used to check on scroll progress. Turning this feature off significantly increases touch action performance.
        Parameters:
        enabled - Either true or false. The default value if true.
        Returns:
        self instance for chaining