Files
robotex/tests/test_main.http

128 lines
3.0 KiB
HTTP

# Test your FastAPI endpoints
GET http://127.0.0.1:8000/
Accept: application/json
###
GET http://127.0.0.1:8000/hello/User
Accept: application/json
###
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
{
"captcha": "token",
"url": "https://example.com/login",
"actions": [
{"type": "fill", "selector": "#email", "value": "user@example.com"},
{"type": "fill", "selector": "#password", "value": "..."},
{"type": "mouse_move", "selector": "#submit"},
{"type": "click", "selector": "#submit"},
{"type": "wait_for", "selector": ".dashboard", "timeout": 30}
],
"proxy": "socks5://user:pass@host:port",
"screen": "1280x920",
"user_agent": "Firefox",
"timeout": 120
}
###
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax
{
"url": "https://browserleaks.com/canvas",
"proxy": "-",
"actions": [
{"type": "wait_for", "selector": "#canvas-hash", "timeout": 10},
{"type": "inner_html", "selector": "#canvas-hash"}
]
}
###
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax
{
"url": "http://127.0.0.1:8001/",
"proxy": "-",
"actions": [
{"type": "fill", "selector": "#username", "value": "webrobo"},
{"type": "fill", "selector": "#password", "value": "31337"},
{"type": "click", "selector": "body > form:nth-child(1) > button:nth-child(7)"},
{"type": "wait_for", "selector": ".user", "timeout": 30}
]
}
###
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
Cookie: session_id=2f2100be-6ce7-40d5-bae5-61424b2504c8; Path=/; SameSite=lax
{
"url": "http://127.0.0.1:8001/",
"proxy": "-",
"actions": [
{"type": "mouse_move", "selector": ".logout"},
{"type": "delay", "value": "3"},
{"type": "click", "selector": ".logout"},
{"type": "wait_for", "selector": "#username", "timeout": 10}
]
}
###
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
{
"url": "http://127.0.0.1:8001/",
"proxy": "-",
"actions": [
{"type": "mouse_move", "selector": ".menu-trigger"},
{"type": "delay", "value": "2"},
{"type": "click", "selector": "div.menu-item:nth-child(3)"},
{"type": "mouse_move", "selector": ".logout"},
{"type": "delay", "value": "10"}
]
}
### 2f2100be-6ce7-40d5-bae5-61424b2504c8
POST http://127.0.0.1:8000/v1/solve
Accept: application/json
Content-Type: application/json
X-API-Key: <key>
{
"url": "https://ifconfig.me/",
"proxy": "http://7LLkWF:yecUzT@200.10.32.226:8000",
"actions": [
{"type": "wait_for", "selector": "#ip_address", "timeout": 10},
{"type": "inner_html", "selector": "#ip_address"}
]
}
### b8f770a3-38c2-45f2-944b-2703798e3503