openSystemTray
Open the system notification tray by swiping down from the status bar on Android or iOS devices for mobile automation testing.
Instructions
Open the system notification tray by swiping down from the status bar
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Platform of the device |
Implementation Reference
- src/server/interactionTools.ts:406-427 (handler)The handler function that executes the openSystemTray tool. It creates a SwipeOnScreen instance and performs a downward swipe including system insets to open the system tray.const openSystemTrayHandler = async (device: BootedDevice, args: OpenSystemTrayArgs, progress?: ProgressCallback) => { try { const swipeOnScreen = new SwipeOnScreen(device); const result = await swipeOnScreen.execute( "down", { duration: 100, includeSystemInsets: true // to access status bar area }, progress ); return createJSONToolResponse({ message: "Opened system tray by swiping down from the status bar", observation: result.observation, ...result }); } catch (error) { throw new ActionableError(`Failed to open system tray: ${error}`); } };
- Zod schema defining the input arguments for the openSystemTray tool, requiring the platform.export const openSystemTraySchema = z.object({ platform: z.enum(["android", "ios"]).describe("Platform of the device") });
- src/server/interactionTools.ts:707-712 (registration)Tool registration call that associates the 'openSystemTray' name, description, schema, and handler with the ToolRegistry."openSystemTray", "Open the system notification tray by swiping down from the status bar", openSystemTraySchema, openSystemTrayHandler, true // Supports progress notifications );
- src/server/interactionTools.ts:37-39 (schema)TypeScript interface defining the arguments for the openSystemTray handler.export interface OpenSystemTrayArgs { platform: Platform; }