@revoloo/cypress6
Version:
Cypress.io end to end testing tool
25 lines (22 loc) • 506 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<img src="/non-existing-image.png"/>
<div></div>
<script>
const img = document.querySelector('img')
const div = document.querySelector('div')
img.onload = () => {
div.innerHTML = 'it loaded'
}
img.onerror = () => {
div.innerHTML = 'error loading image'
}
</script>
</body>
</html>