Skip to content

Conversation

@copilot-developer-agent-robch
Copy link

@copilot-developer-agent-robch copilot-developer-agent-robch bot commented Feb 20, 2025

Added mouse and keyboard input functionality to the mdx web commands. Key changes:

  • Created WebInputHelper class using Playwright API to handle input actions:

    • Mouse: click, move, drag/drop, scroll
    • Keyboard: key press, type text, shortcuts
  • Added command-line options with parameters:

--click "selector"               Click element matching selector
--move <x> <y>                  Move mouse to coordinates
--drag "src" "target"           Drag element from source to target
--scroll <x> <y>                Scroll page by x,y pixels
--type "text"                   Type text
--key "keyname"                 Press a single key
--shortcut "combo"              Send keyboard shortcut

Example usage:

# Fill out a login form
mdx web get "https://example.com" \
  --click "#username" \
  --type "myuser" \
  --click "#password" \
  --type "mypass" \
  --click "#submit"

Added help documentation in web get inputs.txt with examples and usage info for each command.

Added test coverage in web-input-test.yaml to verify functionality.

Fixes #9.

@copilot-developer-agent-robch copilot-developer-agent-robch bot changed the title [WIP] mdx web -- consider adding mouse and keyboard input abilities Add mouse and keyboard input abilities to web commands Feb 20, 2025
@copilot-developer-agent-robch copilot-developer-agent-robch bot marked this pull request as ready for review February 20, 2025 21:58
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

Successfully merging this pull request may close these issues.

mdx web -- consider adding mouse and keyboard input abilities

1 participant