Skip to content

[Feature]: Keyboard shortcuts in UI mode for faster test recording #34657

Open
@crocy

Description

@crocy

🚀 Feature Request

I haven't come across such a feature (request) so I'm suggesting it here.
It would be very nice to have keyboard shortcuts when recording tests in UI mode for most frequently used actions like:

  • r for starting or stopping recording
  • l for selecting the Pick locator tool
  • v for selecting the Assert visibility tool
  • t for selecting the Assert text tool
  • e for selecting the Assert value tool
  • a for selecting the Assert snapshot tool
  • x for expanding a selection (new feature) - when hovering over an element while recording a test or picking a locator, this action traverses one level up the DOM tree and selects the parent element. That means if you hover over a grid element and press "x", the whole grid would get selected instead (and so on up the tree for every x pressed). Ad blockers have such functionality for example.
  • c same as x but in the opposite way, contracting/narrowing the selection, ie. moving down the DOM tree to the child elements
  • I'm also missing a "sticky" assert tool option (in UI mode). That is sometimes I need to check for several elements/assertions and every time I click and create an assertion, I have to click on the assert tool icon again to do another assert.

This should be a "mode" you activate, since having it turned on all the time could prevent the user from inputting some keyboard strokes, or the combination of keys to activate a certain option/tool should be "obscure" enough to not interfere with most users when recording keystrokes. This keyboard shortcuts are just a suggestion and can be assigned to other keys and/or combinations if deemed better that way. The best option would be if the user could reassign the shortcuts to the keys they prefer, but that's just "nice to have" for now :)

Example

The expand/contract selection (the x and c keyboard shortcuts) can be seen with ad blockers, when trying to select what elements to block on a page.

Motivation

Adding keyboard shortcuts and sticky assertions would (in some cases greatly) increase the speed at which the tests would be recorded/generated. The same goes for expanding/contracting the selection since we have to do this manually currently by inspecting the page, finding the right element, copying the XPath and pasting that in the test.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions