Hi all, I'm trying to grant clipboard permission in my test suite. I have added this in my conftest.py
@pytest.fixture(scope="session", autouse=True) def setup(playwright: Playwright): browser = playwright.chromium.launch() context = browser.new_context() permissions = ["clipboard-read", "clipboard-write"] context.grant_permissions(permissions) yield context context.close() browser.close()
but it still asks for my permission every time I ran my test.
Am I doing something wrong or am I missing something? Hoping you could help me, thank you
This thread is trying to answer question "Why does the test suite still ask for clipboard permissions despite the code to grant permissions being added in conftest.py?"
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].