Hi here is an example of a monitor for a status page, where we validate for ‘operational’ status message and the individual components (screen images) that could indicate a failure across the regions.
{
"configuration": {
"chromiumStartupFlags": {
"disable-web-security": false
},
"device": {
"orientation": "landscape",
"deviceName": "Desktop"
}
},
"type": "availability",
"version": "1.0",
"events": [{
"type": "navigate",
"wait": {
"waitFor": "page_complete"
},
"description": "Loading of \"https://status.pexa.com.au/#\"",
"url": "https://status.pexa.com.au/#",
"validate": [{
"type": "text_match",
"failIfFound": false,
"isRegex": false,
"match": "All Systems Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(1) > div.child-components-container > div:nth-child(1)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(1) > div.child-components-container > div:nth-child(2)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(1) > div.child-components-container > div:nth-child(3)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(1) > div.child-components-container > div:nth-child(4)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(1) > div.child-components-container > div:nth-child(5)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(1) > div.child-components-container > div:nth-child(6)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(2) > div.child-components-container > div:nth-child(1)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(2) > div.child-components-container > div:nth-child(2)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(2) > div.child-components-container > div:nth-child(3) "
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(2) > div.child-components-container > div:nth-child(4)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(2) > div.child-components-container > div:nth-child(5)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(2) > div.child-components-container > div:nth-child(6)"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(3) > div"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}, {
"target": {
"locators": [{
"type": "css",
"value": "body > div.layout-content.status.status-index.starter > div.container > div.new-components-section > div.components-section.font-regular > div.components-container.one-column > div:nth-child(4) > div"
}]
},
"type": "element_match",
"failIfFound": false,
"isRegex": false,
"match": "Operational"
}]
}]
}
I don’t think it’s to different to what you want. What you can do is inspect the images and use the css selector for these as validation points; similar to the below. Pretty much the image label changes when there is an issue, so if it changes the label won’t match and you get a failure. Also you can validate on the words ‘System Operational’ which would change if there is an issue.
Hope this helps.