import time import helium gallery_id = "cMeqLga" f = helium.start_firefox(f"http://127.0.0.1:8080/gallery/{gallery_id}", headless=True) assert helium.Text("2021-10-13T15:25:25Z").exists() # Check for meme video by running a js to create a p element if it exists with open(f"find_video_for_{gallery_id}.js", "r") as script: f.execute_script(script.read()) assert helium.Text("video exists").exists()