Skip to content

API for adjusting browser UI state #1060

@jgraham

Description

@jgraham

Mobile browsers generally have multiple UI states, and these states can affect properties of the browser like the size of the layout viewport. Although WebDriver users could try to adjust the size of the viewport directly using emulation commands:

  • This may not actually work on real mobile devices
  • Getting realistic results requires users to know the correct target size for browser / device combinations they care about.

A possible alternative is to just have a command that directly sets the UI state like browser.setUIState({"state": "visible"}). The problem is that different browsers may have different UI states (visible/hidden is very common on mobile today, but there's no reason to assume things will always work like that). We could have something like browser.getUIStates(), which would return a list of valid states for the current browser, but it's unclear if this kind of one-parameter API is flexible enough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions