blob: e8481938a8f54f2531d9f1f69108bf4571b55b7e [file] [log] [blame]
{
// See loading.py or `crossbench loading --help` for more details.
// Usage:
// crossbench loading --page-config=config.hjson
pages: {
// Example below will result in:
// A Scenario named = Google and will perfom the actions listed synchronisly
// Time suffixes accepted:
// milliseconds: ["ms", "millis", "milliseconds"]
// seconds: ["s", "sec", "second", "seconds"]
// minutes: ["m", "min", "minute", "minutes"]
// hours: ["h", "hrs", "hour", "hours"]
//
// Supported Actions:
// GET: {
// action: "get",
// url: URL,
// duration: DURATION,
// ready_state: [any, interactive, complete],
// target: [self, _blank, _parent, _top],
// timeout: DURATION,
// }
//
// CLICK: {
// action: "click",
// selector: [CSS_SELECTOR, XPATH_SELECTOR],
// required: BOOL,
// scroll_into_view: BOOL,
// timeout: DURATION,
// }
//
// WAIT: {
// action: "wait",
// duration: DURATION,
// }
//
// SCROLL: {
// action: "scroll",
// direction: [up, down],
// distance: NUMBER,
// duration: DURATION,
// }
//
"Google": [
{
"action": "get",
"url": "https://www.google.de/search?q=magic",
"duration": "2s"
},
// Click away the cookie banner:
{
"action": "click",
"required": false,
"selector": "xpath///button/div[contains(text(),'akzeptieren')]"
},
{
"action": "click",
"required": false,
"selector": "xpath///button/div[contains(text(),'Accept')]"
},
{
"action": "scroll",
"distance": 2000,
"duration": "3s"
}
],
"Amazon": [
{
"action": "get",
"url": "https://www.amazon.com/s?k=v8"
},
{
"action": "wait",
"duration": "500ms"
},
{
"action": "scroll",
"distance": 2000,
"duration": "2s"
},
{
"action": "scroll",
"distance": -1000,
"duration": "1.5s"
}
],
"Youtube": [
{
"action": "get",
"url": "https://www.youtube.com",
"timeout": "20s",
"ready-state": "interactive"
},
// Click away the cookie banner:
{
"action": "click",
"required": false,
"selector": "xpath///*/button[contains(@aria-label, 'akzeptieren')]"
},
{
"action": "click",
"required": false,
"selector": "xpath///*/button[contains(@aria-label, 'Accept')]"
},
{
"action": "scroll",
"duration": "1s"
}
]
}
}