(sandbox: Sandbox)
| 46 | |
| 47 | |
| 48 | def test_screenshot(sandbox: Sandbox): |
| 49 | image = sandbox.screenshot() |
| 50 | assert image, "Screenshot was not taken successfully" |
| 51 | |
| 52 | # Check if the image is a valid image format |
| 53 | try: |
| 54 | img = Image.open(io.BytesIO(image)) |
| 55 | img.verify() # Verify that it is an image |
| 56 | except Exception: |
| 57 | assert False, "The screenshot is not a valid image." |
| 58 | |
| 59 | |
| 60 | def test_get_cursor_position(sandbox: Sandbox): |
nothing calls this directly
no test coverage detected