import cv2 import time import pytest from playwright.sync_api import Page, expect def test_segmentation_output(page: Page): page.goto("http://localhost:5000/") # Check for the presence of a segmentation feed for the first mono camera (stream 1) segmentation_feed = page.locator("#segmentation-feed-1") expect(segmentation_feed).to_be_visible() # Verify that the segmentation feed is updating initial_src = segmentation_feed.get_attribute("src") page.reload() page.wait_for_selector("#segmentation-feed-1") new_src = segmentation_feed.get_attribute("src") assert initial_src != new_src, "Segmentation feed is not updating"