Skip to content

Commit

Permalink
[wdspec] check that subscription IDs are returned (#50019)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN authored Jan 10, 2025
1 parent f371b41 commit 3fc3dce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions webdriver/tests/bidi/session/subscribe/subscription_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest
import uuid

@pytest.mark.asyncio
async def test_subscribe_subscription_id(subscribe_events):
result = await subscribe_events(events=["browsingContext"])
assert isinstance(result['subscription'], str)
uuid.UUID(hex=result['subscription'])
3 changes: 2 additions & 1 deletion webdriver/tests/support/fixtures_bidi.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ async def subscribe_events(bidi_session):
subscriptions = []

async def subscribe_events(events, contexts=None):
await bidi_session.session.subscribe(events=events, contexts=contexts)
result = await bidi_session.session.subscribe(events=events, contexts=contexts)
subscriptions.append((events, contexts))
return result

yield subscribe_events

Expand Down

0 comments on commit 3fc3dce

Please sign in to comment.