Skip to content

Commit 1205161

Browse files
juliandescottesSkyBlack1225
authored andcommitted
[wdspec] Add invalid.py test for context argument of input.performActions
Depends on D174850 Differential Revision: https://phabricator.services.mozilla.com/D174851 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1826706 gecko-commit: 4099709bbe23ad326b165a39630ba76b8b84b7ab gecko-reviewers: webdriver-reviewers, whimboo
1 parent 54a1d10 commit 1205161

File tree

1 file changed

+22
-0
lines changed
  • webdriver/tests/bidi/input/perform_actions

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import pytest
2+
3+
from webdriver.bidi.modules.input import Actions
4+
from webdriver.bidi.error import InvalidArgumentException, NoSuchFrameException
5+
6+
7+
pytestmark = pytest.mark.asyncio
8+
9+
10+
@pytest.mark.parametrize("value", [None, True, 42, {}, []])
11+
async def test_params_context_invalid_type(bidi_session, value):
12+
actions = Actions()
13+
actions.add_key()
14+
with pytest.raises(InvalidArgumentException):
15+
await bidi_session.input.perform_actions(actions=actions, context=value)
16+
17+
18+
async def test_params_contexts_value_invalid_value(bidi_session):
19+
actions = Actions()
20+
actions.add_key()
21+
with pytest.raises(NoSuchFrameException):
22+
await bidi_session.input.perform_actions(actions=actions, context="foo")

0 commit comments

Comments
 (0)