Skip to content

Commit

Permalink
tests: added keyboard tests (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Aug 5, 2020
1 parent 8697c92 commit d913f1d
Show file tree
Hide file tree
Showing 6 changed files with 507 additions and 6 deletions.
2 changes: 1 addition & 1 deletion playwright/element_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async def type(
timeout: int = None,
noWaitAfter: bool = None,
) -> None:
await self._channel.send("text", locals_to_params(locals()))
await self._channel.send("type", locals_to_params(locals()))

async def press(
self, key: str, delay: int = None, timeout: int = None, noWaitAfter: bool = None
Expand Down
6 changes: 6 additions & 0 deletions tests/async/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
from playwright import async_playwright


# Will mark all the tests as async
def pytest_collection_modifyitems(items):
for item in items:
item.add_marker(pytest.mark.asyncio)


@pytest.fixture(scope="session")
async def playwright():
async with async_playwright() as playwright_object:
Expand Down
1 change: 1 addition & 0 deletions tests/async/test_headful.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ async def test_headless_should_be_able_to_read_cookies_written_by_headful(
):
if is_chromium and is_win:
pytest.skip("see https://github.com/microsoft/playwright/issues/717")
return
# Write a cookie in headful chrome
headful_context = await browser_type.launchPersistentContext(
tmpdir, **{**launch_arguments, "headless": False}
Expand Down

0 comments on commit d913f1d

Please sign in to comment.