MCPcopy
hub / github.com/unclecode/crawl4ai / test_screenshot

Function test_screenshot

tests/async/test_parameters_and_options.py:47–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46@pytest.mark.asyncio
47async def test_screenshot():
48 async with AsyncWebCrawler(verbose=True) as crawler:
49 url = "https://www.nbcnews.com/business"
50 result = await crawler.arun(url=url, screenshot=True, bypass_cache=True)
51
52 assert result.success
53 assert result.screenshot
54 assert isinstance(result.screenshot, str) # Should be a base64 encoded string
55
56@pytest.mark.asyncio
57async def test_custom_user_agent():

Callers

nothing calls this directly

Calls 2

AsyncWebCrawlerClass · 0.90
arunMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…