authentication Scenario 6 — Cookie-Based Session Bypass
Written by RTILA X Engineering Team
Intermediate ~6 min
Prerequisites: basic-navigation/1 forms/1
What You'll Learn
Bypass login by setting session cookies directly
Real-World Use Case
Restoring a previous session quickly
LIVE DEMO
Cookie Session Simulation
Click the button to simulate a session cookie and reveal the extra authenticated dashboard.
EXPECTED OUTPUT
Cookie-Authenticated Dashboard
{
"message": "Welcome! You bypassed login using a session cookie."
}
RTILA X PROJECT JSON
RTILA X Automation Project
cookie-session-bypass.json
{
"name": "Cookie_Based_Session_Bypass",
"settings": {
"urls": [
"https://learn.rtila.com/scenarios/authentication/6"
],
"headless": false,
"navigation_timeout": 30000,
"max_concurrent_workers": 1,
"humanoidEnabled": true,
"humanoidSensitivity": "medium"
},
"datasets": {
"dashboard_text": {
"item_selector": "css=#dashboard-direct",
"properties": [
{
"name": "message",
"type": "text",
"selector": "css=.dashboard-content h2"
}
]
}
},
"commands": [
{
"command": "set_cookie",
"params": {
"name": "session_id",
"value": "abc123"
}
},
{
"command": "goto",
"params": {
"url": "https://learn.rtila.com/scenarios/authentication/6"
}
},
{
"command": "wait_for_selector",
"params": {
"selector": "css=#dashboard-direct"
}
},
{
"command": "extract_data",
"params": {
"dataset": "dashboard_text"
}
}
]
}
RTILA X Concepts
set_cookie writes a session cookie directly into the browser context
before navigation. This often skips the login form and exposes the same content a
returning user would see.
Did you complete this scenario?
Ready to run this automation?
Copy the project JSON above, open RTILA X, create a new project, and paste it.
This scenario covers 2 RTILA X commands and is referenced in 1 learning article.
Continue Learning
Was this helpful?
Thank you for your feedback!