Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to simulate keyboard navigation? #1411

Open
Bagelwolf opened this issue Apr 20, 2022 · 2 comments
Open

How to simulate keyboard navigation? #1411

Bagelwolf opened this issue Apr 20, 2022 · 2 comments

Comments

@Bagelwolf
Copy link

I'm trying to test focus states, which are only triggered via keyboard navigation. Is there a way to simulate a tab or arrow keypress?

Tried seeing if submitting a keycode instead of a string would work; it doesn't.

{ "selector": ".testing-div", "keypress": 9 // JS keycode }

@masi
Copy link

masi commented May 2, 2022

scenarios: [
  {
    "keyPressSelectors": [
      {
        "selector": "#email",
        "keyPress": "[email protected]"
      },
      {
        "selector": "#password",
        "keyPress": "1234"
      }
    ]
  }
]

@HaSistrunk
Copy link

Seconding this as a really useful feature! Any chance to merge the open PR (#1176) that incorporates focus state testing functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants