Generate Playwright Test Script (POST /api/v1/generate-script)
curl -X POST "https://tester-lab.mibot.my.id/api/v1/generate-script" \
-H "X-API-Key: tl_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dsl": {
"testSuite": "Automated Auth Test",
"targetUrl": "https://practicetestautomation.com/practice-test-login/",
"steps": [
{ "step": 1, "description": "Type student into Username", "action": "fill", "targetLabel": "Username", "value": "student" },
{ "step": 2, "description": "Type Password123 into Password", "action": "fill", "targetLabel": "Password", "value": "Password123" },
{ "step": 3, "description": "Click Submit button", "action": "click", "targetLabel": "Submit" }
]
}
}'
Execute Test Script on Server (POST /api/v1/run-test)
curl -X POST "https://tester-lab.mibot.my.id/api/v1/run-test" \
-H "X-API-Key: tl_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "import { test, expect } from \"@playwright/test\";\ntest(\"sample\", async ({ page }) => {\n await page.goto(\"https://example.com\");\n});",
"language": "typescript",
"mode": "headless"
}'