generate-test-script
Create Appium test scripts by defining actions like tap, input, swipe, or wait for Android and iOS platforms using specified selectors and strategies.
Instructions
Generate Appium test script from actions
Input Schema
Name | Required | Description | Default |
---|---|---|---|
actions | Yes | List of actions to perform | |
appPackage | No | App package name (Android) | |
bundleId | No | Bundle ID (iOS) | |
platformName | Yes | Platform to generate script for |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"actions": {
"description": "List of actions to perform",
"items": {
"additionalProperties": false,
"properties": {
"endX": {
"description": "End X coordinate (for swipe actions)",
"type": "number"
},
"endY": {
"description": "End Y coordinate (for swipe actions)",
"type": "number"
},
"selector": {
"description": "Element selector",
"type": "string"
},
"startX": {
"description": "Start X coordinate (for swipe actions)",
"type": "number"
},
"startY": {
"description": "Start Y coordinate (for swipe actions)",
"type": "number"
},
"strategy": {
"description": "Selector strategy: xpath, id, accessibility id",
"type": "string"
},
"text": {
"description": "Text to input (for input actions)",
"type": "string"
},
"timeoutMs": {
"description": "Timeout in ms (for wait actions)",
"type": "number"
},
"type": {
"description": "Action type: tap, input, swipe, wait",
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"type": "array"
},
"appPackage": {
"description": "App package name (Android)",
"type": "string"
},
"bundleId": {
"description": "Bundle ID (iOS)",
"type": "string"
},
"platformName": {
"description": "Platform to generate script for",
"enum": [
"Android",
"iOS"
],
"type": "string"
}
},
"required": [
"platformName",
"actions"
],
"type": "object"
}