test_react_app
Test React and React Native web applications by performing automated interactions including clicks, gestures, and validations to verify functionality and behavior.
Instructions
Test any React app (regular React or React Native web) with enhanced interactions and mobile gestures
Input Schema
Name | Required | Description | Default |
---|---|---|---|
actions | Yes | Array of actions to perform on the React Native web app | |
browser | No | Browser engine to use | chromium |
device | No | Device to emulate (e.g., "iPhone 12", "Pixel 5") | |
url | Yes | URL of the React app (e.g., http://localhost:3000 for regular React, http://localhost:8081 for RN web) | |
waitForHydration | No | Wait for React hydration before starting tests (recommended for React apps, especially React Native web) |
Input Schema (JSON Schema)
{
"properties": {
"actions": {
"description": "Array of actions to perform on the React Native web app",
"items": {
"properties": {
"coordinates": {
"description": "Coordinates for tap/swipe actions",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"type": "object"
},
"selector": {
"description": "CSS selector, testID, or accessibility label for the element",
"type": "string"
},
"timeout": {
"default": 10000,
"description": "Timeout in milliseconds",
"type": "number"
},
"type": {
"enum": [
"click",
"fill",
"wait",
"screenshot",
"getText",
"getAttribute",
"swipe",
"scroll",
"tap",
"longPress",
"waitForNavigation"
],
"type": "string"
},
"value": {
"description": "Value for fill actions, attribute name for getAttribute, or direction for swipe",
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"type": "array"
},
"browser": {
"default": "chromium",
"description": "Browser engine to use",
"enum": [
"chromium",
"firefox",
"webkit"
],
"type": "string"
},
"device": {
"description": "Device to emulate (e.g., \"iPhone 12\", \"Pixel 5\")",
"type": "string"
},
"url": {
"description": "URL of the React app (e.g., http://localhost:3000 for regular React, http://localhost:8081 for RN web)",
"type": "string"
},
"waitForHydration": {
"default": false,
"description": "Wait for React hydration before starting tests (recommended for React apps, especially React Native web)",
"type": "boolean"
}
},
"required": [
"url",
"actions"
],
"type": "object"
}