Skip to content

Commit 92d22b8

Browse files
committed
updated doc; add _async suffix
1 parent f16e274 commit 92d22b8

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

examples/async_api_demo.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@
1515
import os
1616

1717
# Import async API functions
18-
from sentience.async_api import AsyncSentienceBrowser, click_async, find, press_async, snapshot_async, type_text_async
18+
from sentience.async_api import (
19+
AsyncSentienceBrowser,
20+
click_async,
21+
find,
22+
press_async,
23+
snapshot_async,
24+
type_text_async,
25+
)
1926
from sentience.models import SnapshotOptions, Viewport
2027

2128

@@ -136,6 +143,7 @@ async def from_existing_page_example():
136143

137144
async def multiple_browsers_example():
138145
"""Example running multiple browsers concurrently"""
146+
139147
async def process_site(url: str):
140148
async with AsyncSentienceBrowser(headless=True) as browser:
141149
await browser.goto(url)
@@ -182,4 +190,3 @@ async def main():
182190
if __name__ == "__main__":
183191
# Run the async main function
184192
asyncio.run(main())
185-

tests/test_async_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ async def test_async_click_rect():
147147
await browser.page.wait_for_load_state("networkidle")
148148

149149
# Click at specific coordinates
150-
result = await click_rect_async(browser, {"x": 100, "y": 200, "w": 50, "h": 30}, highlight=False)
150+
result = await click_rect_async(
151+
browser, {"x": 100, "y": 200, "w": 50, "h": 30}, highlight=False
152+
)
151153
assert result.success is True
152154
assert result.duration_ms > 0
153155

0 commit comments

Comments
 (0)