mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-06 07:57:27 +08:00
add generic swipe tool with auto-detection of direction vs coordinate params
- Added ACTION_Swipe to option/action.go for generic swipe functionality - Implemented ToolSwipe in mcp_server.go that automatically detects parameter type: - String params (up/down/left/right) use direction-based swipe logic - Array params [fromX, fromY, toX, toY] use coordinate-based swipe logic - Added comprehensive test coverage for ToolSwipe in mcp_server_test.go - Updated tool registration to include the new generic swipe tool - All tests pass, confirming backward compatibility with existing tools
This commit is contained in:
@@ -37,6 +37,7 @@ const (
|
||||
ACTION_TapByOCR ActionMethod = "tap_ocr"
|
||||
ACTION_TapByCV ActionMethod = "tap_cv"
|
||||
ACTION_DoubleTapXY ActionMethod = "double_tap_xy"
|
||||
ACTION_Swipe ActionMethod = "swipe" // swipe by direction or coordinates
|
||||
ACTION_SwipeDirection ActionMethod = "swipe_direction" // swipe by direction (up, down, left, right)
|
||||
ACTION_SwipeCoordinate ActionMethod = "swipe_coordinate" // swipe by coordinates (fromX, fromY, toX, toY)
|
||||
ACTION_Drag ActionMethod = "drag"
|
||||
|
||||
Reference in New Issue
Block a user