Configuration
Configuring URL Patterns
Q: How do I specify which URLs to intercept?
const stoobly = new Stoobly();
// Exact URL match
const interceptor1 = stoobly.playwrightInterceptor({
urls: ['https://api.example.com/users'],
scenarioKey: '<SCENARIO-KEY>',
});
// Regex pattern (match all API endpoints)
const interceptor2 = stoobly.playwrightInterceptor({
urls: [new RegExp('https://api.example.com/.*')],
scenarioKey: '<SCENARIO-KEY>',
});
// Multiple URLs
const interceptor3 = stoobly.playwrightInterceptor({
urls: [
'https://api.example.com/users',
'https://api.example.com/products',
new RegExp('https://cdn.example.com/.*'),
],
scenarioKey: '<SCENARIO-KEY>',
});Q: How do I configure per-URL options like match rules or fixture paths?
Q: How do I change the intercepted URLs dynamically?
Scenarios and Sessions
Q: How do I specify a scenario for my tests?
Q: How do I change the scenario dynamically?
Q: What is a session ID and how do I use it?
Recording Configuration
Q: What record policies are available?
Q: What's the difference between record orders?
Q: What record strategies are available?
Q: How do I change record settings dynamically?
Controlling Interception
Q: How do I stop recording requests?
Q: How do I completely remove the interceptor?
Q: What's the difference between clear() and clearRecord()?
clear() and clearRecord()?Advanced Configuration
Q: How do I set a custom Stoobly UI URL?
Q: How do I use test titles for request grouping?
Q: Can I use the interceptor without a test framework?
Last updated